Visual grouping
Break up controls within a menu, form, or settings panel.
Components / Display
A horizontal or vertical rule between related sections.
Last changed in version 0.13.0: Add avatar groups and chips, expand the block gallery, and improve component colors, spacing, and motion.
bunx --bun @getweini/cli@latest add separatorImport the files copied by the install command, then place the component in your Vue template. The text and values in the example belong to your app; change them to fit your task.
<script setup lang="ts">
import Separator from './components/ui/separator/Separator.vue'
</script>
<template>
<Separator />
<div class="flex h-6 items-center gap-4">
<span>First</span>
<Separator orientation="vertical" :decorative="false" />
<span>Second</span>
</div>
</template>Set decorative to false when the separator conveys structure to assistive technology.
Break up controls within a menu, form, or settings panel.
Expose a division between two content groups when it helps navigation.
The default decorative separator avoids adding extra noise to the accessibility tree.
<script setup lang="ts">
import Separator from './components/ui/separator/Separator.vue'
</script>
<template>
<section>
<h2>Profile</h2>
<p>Public information</p>
</section>
<Separator class="my-4" />
<section>
<h2>Security</h2>
<p>Sign-in options</p>
</section>
</template>Give a vertical separator a parent with a definite height.
<script setup lang="ts">
import Separator from './components/ui/separator/Separator.vue'
</script>
<template>
<div class="flex h-8 items-center gap-3">
<span>Draft</span>
<Separator orientation="vertical" :decorative="false" />
<span>Updated today</span>
</div>
</template>Every public prop, model, event, slot, and exposed member of the installed Vue parts is listed below. “Not set” means you can leave that value out; “Required” means you must provide it. Native HTML attributes also work where the component uses a native element.
| Name | Type or signature | Default | What it does |
|---|---|---|---|
orientationprop | "horizontal" | "vertical" | undefined | "horizontal" | Arrange items horizontally or vertically. |
decorativeprop | boolean | undefined | true | Hide purely visual content from assistive technology. |
// packages/frameworks/vue/components/separator/types.ts
// ------- TYPES -------
export interface SeparatorProps {
orientation?: 'horizontal' | 'vertical'
decorative?: boolean
}