Skip to content
Focsd homeFocsd homeFocsd
Forms

Separator

A horizontal or vertical divider.

  • Tag: focsd-separator
  • Pattern: Separator
  • Category: Layout

Example

Billing details

Invoices

HTML
<div class="stack">
<p>Billing details</p>
<focsd-separator></focsd-separator>
<p>Invoices</p>
<div class="row">
<a href="#">Edit</a>
<focsd-separator orientation="vertical"></focsd-separator>
<a href="#">Duplicate</a>
<focsd-separator orientation="vertical"></focsd-separator>
<a href="#">Archive</a>
</div>
</div>

Usage

Import the module once, then use the tag like any HTML element. Every framework below renders the same element; see Frameworks for setup.

<script type="module">
import '@focsd-dev/components/focsd-separator.js';
</script>
<focsd-separator></focsd-separator>

API

Attributes

AttributePropertyTypeDefault
orientationorientation'horizontal' | 'vertical'horizontal
decorativedecorativebooleanfalse

CSS parts

Style the inside of the component with ::part(), for example focsd-separator::part(line).

PartDescription
lineThe line element.

Accessibility

  • role="separator" with aria-orientation; add decorative (role="none") to hide purely visual dividers from assistive technology.
  • Set the color with --focsd-separator-color (default the edge color, visible on every theme).