Separator
Projects
Members
Installation
npx @mielui/svelte add separatoryarn dlx @mielui/svelte add separatorbunx @mielui/svelte add separatorUsage
Separator renders a semantic separator by default. Set decorative when spacing and styling already convey the grouping, so assistive technology skips it. A horizontal separator fills the available width; orientation="vertical" needs a surrounding row with a defined height. class, style, other attributes, and bind:element go to the divider element.
<script lang="ts">
import { Separator } from '@mielui/svelte/components/separator';
</script>
<Separator />
<Separator orientation="vertical" decorative />Examples
Both orientations
A horizontal separator splits a heading from a row, and a decorative vertical one splits the two items in that row.
Workspace
Horizontal sections
Notifications
Choose which updates you receive.
Privacy
Manage who can see your activity.
API reference
Separator
idstringId of the element.
stylestring | StyleProperties | nullInline styles for the element.
orientationOrientationThe orientation of the separator.
Default
'horizontal'decorativebooleanWhether the separator is decorative and should be hidden from assistive technologies.
elementBindableHTMLDivElement | nullBindable reference to the DOM element.
Default
null
pnpm dlx @mielui/svelte add separator