When to use
Section titled “When to use”Use Separator to split independent groups of content: menu sections, toolbar groups, form sections and options divided by “or”.
When not to use
Section titled “When not to use”- When spacing is enough: If whitespace already separates the groups, skip the rule; every rule adds visual weight.
- Between list rows: To draw a rule between every child of a stack, use the
separatorprop of Stack. - For a box outline: Borders come from the
borderprop of Box; Separator does not draw a frame.
Anatomy
Section titled “Anatomy”or
import { Separator } from '@bigbang/ui';
export default function WithLabel() { return ( <div className="w-full max-w-80"> <Separator label="or" /> </div> );}- Rule: 1 px thick (
border-width-default), incolor-border-subtle. With a label, it sits on both sides of the text as two segments. - Label: Optional short text (
label); visible on a horizontal rule only.
Behaviour
Section titled “Behaviour”- Separator is static: it does not change on hover, click or focus, and it is not in the tab order.
- A horizontal rule fills the full width of its container; a vertical rule stretches to the height of its row (
self-stretch). - With a label, the two rule segments share the remaining width equally with
flex-1; the gap between label and segments isspace-md(8 px). - A
labelgiven together withorientation="vertical"is ignored. - Use
classNamefor layout only, such as margins; do not change colour or thickness.
Guidelines
Section titled “Guidelines”Place it between groups
Section titled “Place it between groups”The rule sits between groups of meaning. Separating every item makes the groups unreadable.
First itemSecond itemThird item
First itemSecond itemThird item
Keep the label short
Section titled “Keep the label short”The label sits on one line in the middle of the rule; a long text crushes the rule.
or
Choose only one of these two options
Content
Section titled “Content”- Write the label in one or two words: “or”.
- Use sentence case and no punctuation.
- Do not use the label as a command or a heading; use Heading for a section title.
| Turkish | English |
|---|---|
| veya | or |
| ya da | or |