Foundation and layout
Separator
Horizontal or vertical divider for grouping related content.
Live example
Account settings
Notification settings
Notification settings
LightDark
Account settings
Notification settings
Notification settings
LightDark
Account settings
Notification settings
Notification settings
LightDark
Usage
Each example includes the complete adapter-specific parameter reference. Copy it as a starting point, then remove options your use case does not need.
React
import { Separator } from "@cofob/design-system-react";
/**
* Complete Separator parameter reference.
* @param orientation
* type: "horizontal" | "vertical"
* default: "horizontal"
* example: "horizontal"
* @param decorative
* type: boolean
* default: false
* example: {decorative}
* @param separator attributes
* type: native element attributes
* default: —
* example: class / style / aria-* / data-*
*/
export function SeparatorExample() {
return (
<Separator decorative />
);
}Svelte
<script lang="ts">
import { Separator } from "@cofob/design-system-svelte";
// Complete Separator parameter reference.
// orientation
// type: "horizontal" | "vertical"
// default: "horizontal"
// example: "horizontal"
// decorative
// type: boolean
// default: false
// example: {decorative}
// separator attributes
// type: native element attributes
// default: —
// example: class / style / aria-* / data-*
</script>
<Separator decorative />HTML
<!--
Complete Separator parameter reference.
orientation
type: "horizontal" | "vertical"
default: "horizontal"
example: "horizontal"
decorative
type: boolean
default: false
example: {decorative}
separator attributes
type: native element attributes
default: —
example: class / style / aria-* / data-*
-->
<hr class="cf-separator" />Parameters
Adapter differences are explicit. Native element attributes are forwarded in React and Svelte and can be written directly in HTML.
| Parameter | Type | Default | Adapters | Example | Description |
|---|---|---|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" | React · Svelte · HTML | "horizontal" | Sets layout and the matching keyboard navigation axis or ARIA orientation. |
decorative | boolean | false | React · Svelte · HTML | {decorative} | Removes separator semantics when the line is purely visual. |
separator attributes | native element attributes | — | React · Svelte · HTML | class / style / aria-* / data-* | Forwards native class/style, accessibility, event, and data attributes to the root element. |