Components
Separator
A line between groups of content, horizontal or vertical, decorative by default.
Web only — React, from @krizaka/ui/separator. Stable: its API only changes in a major version.
Why it is here. A primitive of the platform: dividers inside menus, lists and cards.
When to use
- Between groups of a list or a menu.
- Between items of a toolbar or a row of links (
orientation="vertical").
When not to use
- To separate every item of a list: use spacing.
- To separate items of a menu.Use instead: Dropdown menu
Installation
Install
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Import
import { Separator } from "@krizaka/ui/separator";Examples
Horizontal
Between two groups.
Account
Notifications
Vertical
Between items of a row, as real separators.
VideosLiveShop
Props
This module has no component props: see the import and the preview above.
Accessibility
- Radix Separator: decorative by default (
role="none");decorative={false}givesrole="separator"and its orientation.
Best practices
- Prefer space to lines; a separator marks a change of group.
decorative={false}only when the separation means something to a screen-reader user.
Related components
Generated from the code of @krizaka/ui 3.8.0: its meta.ts, its examples and its types.Edit this documentation on GitHub