Separator
docs/separatorFreeComponent
separator component for SolidJS
Live preview
live · rendered by the registry
Rendered by docs on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://solidcn.dev/r/separator.jsonSource
1import { Separator as KobalteSeparator } from "@kobalte/core/separator";2import type { Component } from "solid-js";3import { splitProps } from "solid-js";4import { cn } from "~/lib/utils";56export type SeparatorProps = {7 orientation?: "horizontal" | "vertical";8 class?: string;9};1011export const Separator: Component<SeparatorProps> = (props) => {12 const [local, rest] = splitProps(props, ["class", "orientation"]);1314 return (15 <KobalteSeparator16 orientation={local.orientation ?? "horizontal"}17 class={cn(18 "shrink-0 bg-border",19 local.orientation === "vertical" ? "h-full w-px" : "h-px w-full",20 local.class,21 )}22 {...rest}23 />24 );25};
More from docs
All 44 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | docs | Components | Free | no deps | |
| Alert Dialogalert-dialog | docs | Components | Free | no deps | |
| Avataravatar | docs | Components | Free | no deps | |
| Badgebadge | docs | Components | Free | no deps | |
| Breadcrumbbreadcrumb | docs | Components | Free | no deps | |
| Buttonbutton | docs | Components | Free | no deps | |
| Calendarcalendar | docs | Components | Free | no deps | |
| Cardcard | docs | Components | Free | no deps |
