Reka UI logoReka
backdrop
Components

Separator

Visually or semantically separates content.
Reka UI
An open-source UI component library.
Blog
Docs
Source

Features

  • Supports horizontal and vertical orientations.

Installation

Install the component from your command line.

sh
$ npm add reka-ui

Anatomy

Import all parts and piece them together.

vue
<script setup>
import { Separator } from 'reka-ui'
</script>

<template>
  <Separator />
</template>

API Reference

Root

The separator.

Data AttributeValue
[data-orientation]"vertical" | "horizontal"

Accessibility

Adheres to the separator role requirements.

Headless composable

useSeparator returns the root surface with role, aria-orientation and data-orientation. Bind its attrs.value to any element.

vue
<script setup lang="ts">
import { useSeparator } from 'reka-ui'

const separator = useSeparator({ orientation: 'vertical' })
</script>

<template>
  <div v-bind="separator.root.attrs.value" />
</template>

Pass decorative: true to remove it from the accessibility tree. The composable is experimental and callable outside component setup.