Separator

PreviousNext

A separator component for React Native applications.

Docs
nativeuiui

Preview

Loading preview…
registry/separator/separator.tsx
import React from "react";
import { View } from "react-native";
import { cn } from "@/lib/utils";

interface SeparatorProps {
  className?: string;
  orientation?: "horizontal" | "vertical";
}

function Separator({
  className,
  orientation = "horizontal",
}: SeparatorProps) {
  return (
    <View
      className={cn(
        "bg-border",
        orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
        className
      )}
    />
  );
}

export { Separator };

Installation

npx shadcn@latest add @nativeui/separator

Usage

import { Separator } from "@/components/ui/separator"
<Separator />