Skip to content

Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Documentation navigation

Components / Display

Separator

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.

Interactive showcase

Install

Run in your project
bunx --bun @getweini/cli@latest add separator

Start with this example

Import 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.

FirstSecond
Vue
<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.

When to use it

Visual grouping

Break up controls within a menu, form, or settings panel.

Meaningful division

Expose a division between two content groups when it helps navigation.

More examples

Settings sections

The default decorative separator avoids adding extra noise to the accessibility tree.

Settings sections
<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>

Vertical divider

Give a vertical separator a parent with a definite height.

Vertical divider
<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>

Complete API

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.

Separator

Complete API for Separator
NameType or signatureDefaultWhat it does
orientationprop"horizontal" | "vertical" | undefined"horizontal"Arrange items horizontally or vertically.
decorativepropboolean | undefinedtrueHide purely visual content from assistive technology.
Public type definitions
Public types
// packages/frameworks/vue/components/separator/types.ts
// ------- TYPES -------

export interface SeparatorProps {
  orientation?: 'horizontal' | 'vertical'
  decorative?: boolean
}

Implementation notes

  • Vertical rules need available height from their container.
  • Spacing around the separator belongs to the surrounding layout.

Accessibility and localization

  • Set decorative to false only when the divider conveys a meaningful structural boundary.

Source contract and editing guidance