分隔线
在视觉或语义上分隔内容。
Reka UI
An open-source UI component library.
Blog
Docs
Source
功能特性
- 支持水平和垂直两种方向
安装
通过命令行安装该组件。
sh
$ npm add reka-ui结构
导入所有部件并组合在一起。
vue
<script setup>
import { Separator } from 'reka-ui'
</script>
<template>
<Separator />
</template>API 参考
根组件 (Root)
分隔线组件。
| Prop | Default | Type |
|---|---|---|
as | 'div' | AsTag | ComponentThe element or component this component should render as. Can be overwritten by |
asChild | booleanChange the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. | |
decorative | booleanWhether or not the component is purely decorative. | |
orientation | 'horizontal' | 'vertical' | 'horizontal'Orientation of the component. Either |
| Data Attribute | Value |
|---|---|
[data-orientation] | "vertical" | "horizontal" |
无障碍访问
遵循 separator 角色要求。
