hp-separator
Visual + semantic divider. Horizontal (default) or vertical, with an optional centre
glyph (hex, dot, or none). decorative flips between
role="separator" and role="presentation" for screen readers.
section one section two section three section four
left middle right
Install
bun add @hexpunk/core lit import "@hexpunk/core"; Properties
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
orientation | orientation | HpSeparatorOrientation | "horizontal" | Layout direction. Horizontal is a row divider; vertical is a column divider. |
decorative | decorative | boolean | false | When set, the separator is purely visual (role=presentation, invisible to assistive tech). Default unset = role=separator. |
mark | mark | HpSeparatorMark | "hex" | Centre glyph. `hex` (default) reads as a small node on the divider; `dot` is a tighter filled dot; `none` is a clean line. |
CSS Parts
| Part | Description |
|---|---|
line | The line segments either side of the centre glyph |
mark | The centre glyph element |
When to use
role="separator" announces the divider as a structural break.
Use decorative when the surrounding hierarchy already conveys the
grouping (heading, landmark) and the line is purely visual.
No per-component entries in CHANGELOG.md yet.