Web 0.2.0
Details
- Defaultlight7.93 : 1AA 4.5dark9.07 : 1AA 4.5
- measured on 0.2.0
npx shadcn@latest add @maeso/separator- Size
- 5.5 kB gzipmeasured on 0.2.0
- First install
- Add the registry once
Usage
Place a separator between distinct groups. Choose its orientation to match the layout.
Accessibility
Use semantic separation only when it conveys structure. Keep purely visual rules decorative.
When to use
Use when spacing alone does not make grouping clear. Do not use repeated rules as a substitute for headings.
Install
Add this registry to your project's components.json once, before the first install. Keep your existing settings and other registries.
{
"registries": {
"@maeso": "http://127.0.0.1:4321/r/{name}.json"
}
}Then install the registry's default theme once, and import its sheet in the CSS entry that imports Tailwind. It paints every item from this registry.
npx shadcn@latest add @maeso/maeso@import "./styles/theme.web.css";npx shadcn@latest add @maeso/separatorProps
Separator
| Prop | Type | Required | Description |
|---|---|---|---|
| label | string | undefined | no | Turns the rule into a labelled break in a stack. |
| orientation | "horizontal" | "vertical" | undefined | no | |
| spacing | string | undefined | no | A CSS length applied on the axis across the rule. |
| style | CSSProperties | undefined | no |
Also accepts 1 inherited prop
| Prop | Type | Required | Description |
|---|---|---|---|
| weight | "hairline" | "standard" | "strong" | undefined | no |
Proof
Contrast
measured on 0.2.0
| State | Foreground | Background | Ratio | Floor |
|---|---|---|---|---|
| default | rgb(67 77 86) | rgb(248 245 240) | 7.93 | AA 4.5 |
| default (dark) | rgb(181 182 182) | rgb(7 21 34) | 9.07 | AA 4.5 |
Size
5484 gzip bytes · measured on 0.2.0
Example
import { Separator } from "@/components/ui/_kit/display/separator/Separator";
const Example = () => (
<div className="w-full max-w-105">
<Separator label="Details" />
</div>
);
export default Example;not on native yet