component

Separator

props · 11 shown · 11 total

Content

  • children slot svelte
    Snippet

    Optional label rendered inline, interrupting the rule. Omit it for a plain rule.

Appearance

  • "subtle" "bold" "accent"
    default "subtle"

    Weight of the rule: `subtle` for the everyday hairline between sections, `bold` where the split is structural, `accent` to tint it with the active `colorPalette`.

  • "dashed" "dotted" "solid"
    default "solid"

    Stroke style of the rule.

  • "inherit" "cyan" "danger" "dynamic" "mauve" "neutral" "pink" "primary" "sage" "slate" "stone" "success" "teal" "violet" "warning"
    default "neutral"

    Semantic palette the rule draws from, forwarded as `colorPalette` — so `emphasis` picks the weight and `tone` picks the hue. Also tints the label, which inherits the palette's custom properties.

Layout

  • "center" "end" "start"
    default "center"

    Where the label sits along the rule. Has no effect without a label.

  • "horizontal" "vertical"
    default "horizontal"

    Axis the rule runs along. A `vertical` separator stretches to its parent's cross axis, so it needs a flex or grid parent with a definite height.

  • "lg" "md" "sm" "none" "2xs" "3xs" "xs"
    default "none"

    Space reserved on both sides of the rule, along its cross axis — block margin when horizontal, inline margin when vertical.

Accessibility

  • boolean
    default false

    Whether the separator is purely visual. A semantic separator (the default) is exposed as `role="separator"` with an orientation, so assistive tech can announce the boundary. Set `decorative` when the split is already conveyed some other way — a heading, a landmark, a list — and the extra announcement would only be noise.

Advanced

  • element binding svelte
    HTMLDivElement null

    Bound reference to the root element (`bind:this`).

  • SeparatorPassThrough<RootElementAttributes>

    Per-slot style and HTML-attribute overrides.

  • boolean
    default false

    Astro / vanilla: serialize the props into `data-separator-config` so the client runtime hydrates this instance and `getPindoba(el, "separator")` can `update()` it. Frameworks with their own reactivity don't need it.

Plus all standard <div> HTML attributes.

Type

  • Components
  • Blocks