separator
lyse/separatorFreeComponent
lyse publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by lyse on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.getlyse.com/r/separator.jsonSource
1import * as React from "react"2import { cva, type VariantProps } from "class-variance-authority"34import { cn } from "@/lib/utils"5import "./separator.css"67const separatorVariants = cva("separator-base shrink-0", {8 variants: {9 orientation: {10 horizontal: "w-full h-px",11 vertical: "w-px h-full",12 },13 variant: {14 subtle: "separator-subtle",15 default: "separator-default",16 strong: "separator-strong",17 },18 },19 defaultVariants: {20 orientation: "horizontal",21 variant: "default",22 },23})2425function Separator({26 className,27 orientation = "horizontal",28 variant,29 decorative = true,30 ...props31}: React.ComponentProps<"div"> &32 VariantProps<typeof separatorVariants> & {33 decorative?: boolean34 }) {35 return (36 <div37 data-slot="separator"38 role={decorative ? "none" : "separator"}39 aria-orientation={40 !decorative && orientation === "vertical" ? "vertical" : undefined41 }42 aria-hidden={decorative ? true : undefined}43 className={cn(separatorVariants({ orientation, variant, className }))}44 {...props}45 />46 )47}4849export { Separator, separatorVariants }
What it pulls in
npm packages
Other registry items
Files it writes
More from lyse
All 33 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| action-cardaction-card | lyse | Components | Free | no deps · 2 files | |
| alertalert | lyse | Components | Free | 2 deps · 2 files | |
| alert-dialogalert-dialog | lyse | Components | Free | 2 deps · 2 files | |
| avataravatar | lyse | Components | Free | 3 deps · 2 files | |
| badgebadge | lyse | Components | Free | 1 dep · 2 files | |
| banner-infobanner-info | lyse | Components | Free | 2 deps · 2 files | |
| breadcrumbbreadcrumb | lyse | Components | Free | 2 deps · 2 files | |
| buttonbutton | lyse | Components | Free | 2 deps · 2 files |
