Separator
tetra-ui/separatorFreeComponent
Divides content with a horizontal or vertical line.
Live preview
live · rendered by the registry
Rendered by tetra-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://tetra-ui.com/r/separator.jsonSource
1import { cva, type VariantProps } from "class-variance-authority";2import { View } from "react-native";34// Components5export const Separator = ({6 className,7 orientation,8 thickness,9 ...props10}: React.ComponentProps<typeof View> &11 VariantProps<typeof separatorVariants>) => {12 return (13 <View14 className={separatorVariants({ className, orientation, thickness })}15 data-slot="separator"16 {...props}17 />18 );19};2021// Styles22const separatorVariants = cva("h-10 bg-border", {23 compoundVariants: [24 {25 class: "h-hairline",26 orientation: "horizontal",27 thickness: "thin",28 },29 {30 class: "h-1",31 orientation: "horizontal",32 thickness: "thick",33 },34 {35 class: "w-hairline",36 orientation: "vertical",37 thickness: "thin",38 },39 {40 class: "w-1",41 orientation: "vertical",42 thickness: "thick",43 },44 ],45 defaultVariants: {46 orientation: "horizontal",47 thickness: "thin",48 },49 variants: {50 orientation: {51 horizontal: "w-full",52 vertical: "h-full",53 },54 thickness: {55 thick: "",56 thin: "",57 },58 },59});
Files it writes
More from tetra-ui
All 41 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | tetra-ui | Components | Free | 1 dep | |
| Action Inputaction-input | tetra-ui | Components | Free | no deps | |
| Alertalert | tetra-ui | Components | Free | no deps | |
| Avataravatar | tetra-ui | Components | Free | no deps | |
| Badgebadge | tetra-ui | Components | Free | no deps | |
| Bottom Sheetbottom-sheet | tetra-ui | Components | Free | 4 deps · 7 files | |
| Buttonbutton | tetra-ui | Components | Free | no deps | |
| Cardcard | tetra-ui | Components | Free | no deps |
