Separator
A horizontal or vertical divider.
Example
<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>import { Separator } from '@focsd-dev/react';
export function Example() { return <Separator></Separator>;}<script setup>import '@focsd-dev/components/focsd-separator.js';</script>
<template> <focsd-separator></focsd-separator></template>// Add CUSTOM_ELEMENTS_SCHEMA to the component's schemas, then:import '@focsd-dev/components/focsd-separator.js';
// template<focsd-separator></focsd-separator><script> import '@focsd-dev/components/focsd-separator.js';</script>
<focsd-separator></focsd-separator>API
Attributes
| Attribute | Property | Type | Default |
|---|---|---|---|
orientation | orientation | 'horizontal' | 'vertical' | horizontal |
decorative | decorative | boolean | false |
CSS parts
Style the inside of the component with ::part(), for example focsd-separator::part(line).
| Part | Description |
|---|---|
line | The line element. |
Accessibility
role="separator"witharia-orientation; adddecorative(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).
Ask the docs
Hi, what are you building?
Ask about any component, theming, forms or frameworks. I answer with the right component, a snippet and a link to its docs.