Separator

A 1px rule that turns with its orientation and is announced as a separator.

01Preview

01
Full screen
aiellie/uiBase UI parts, wrapped one to one.

02Installation

npx shadcn@latest add https://aiellie.app/r/separator.json

03API reference

01
From the Base UI documentation

A separator element accessible to screen readers. Renders a <div> element.

Props

PropTypeDefaultDescription
orientationOrientation'horizontal'The orientation of the separator.
classNamestring | ((state: Separator.State) => string | undefined)-CSS class applied to the element, or a function that returns a class based on the component's state.
styleReact.CSSProperties | ((state: Separator.State) => React.CSSProperties | undefined)-Style applied to the element, or a function that returns a style object based on the component's state.
renderReactElement | ((props: HTMLProps, state: Separator.State) => ReactElement)-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Data Attributes

AttributeTypeDescription
data-orientation'horizontal' | 'vertical'Indicates the orientation of the separator.