Admin 元件

Divider

參考API
區隔內容的分隔線。方向:水平(預設)、垂直。

安裝

Terminal
pnpm dlx shadcn-vue add @admin/divider
import { AdminDivider } from '@/components/admin/divider'

用法

<script setup lang="ts">import { AdminDivider } from '@/components/admin/divider'</script>​<template>  <div class="w-full max-w-xs">    <p class="typo-content-medium">Above</p>    <admin-divider />    <p class="typo-content-medium">Below</p>  </div></template>

場景

垂直分隔線

<script setup lang="ts">import { AdminDivider } from '@/components/admin/divider'</script>​<template>  <div class="flex h-10 items-center gap-4">    <span class="typo-content-medium">編輯</span>    <admin-divider orientation="vertical" />    <span class="typo-content-medium">複製</span>    <admin-divider orientation="vertical" />    <span class="typo-content-medium">刪除</span>  </div></template>

API 參考

組成

<template>  <admin-divider /></template>

admin-divider

Props

名稱型別預設值說明
orientationDataOrientation | undefined"horizontal"Orientation of the component. Either `vertical` or `horizontal`. Defaults to `horizontal`.
decorativeboolean | undefinedtrueWhether or not the component is purely decorative. When `true`, accessibility-related attributes are updated so that that the rendered element is removed from the accessibility tree.
asChildboolean | undefined—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details.
asglobalThis.Component | AsTag | undefined"div"The element or component this component should render as. Can be overwritten by `asChild`.
classClassValue—根元素之自訂 class

更新紀錄

此元件尚無更新紀錄。