`)內,PDF 寬度會推擠父容器;需在父 wrapper 加 `w-full` 或 `min-w-0` 確保 viewer 寬度受控。
## 更新紀錄
:admin-changelog{component="AdminPdfViewer"}
# Progress
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/progress
```
```ts
import { AdminProgress } from '@/components/admin/progress'
```
## 用法
```vue
```
## 場景
### 動態進度
以 interval 或事件來源更新 `model-value`,進度條會平滑過渡。
```vue
```
### 多項進度列表
```vue
{{ step.label }}
{{ step.value }}%
```
### 不確定進度
當進度總量未知時,傳入 `model-value="null"` 進入 indeterminate 狀態:進度條顯示不確定動畫並隱藏百分比文字(此時 `show-value` 不生效)。待取得實際進度後再改回數值即可。
```vue
{{ value === null ? '設為 40%' : '設為 indeterminate' }}
```
## API 參考
### 組成
```vue
```
### admin-progress
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------------- | ------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `modelValue` | `number | null | undefined` | `0` | The progress value. Can be bind as \`v-model\`.\
進度值。傳入 \`null\` 表示 indeterminate(進度未知),此時顯示不確定動畫並隱藏百分比文字。 |
| `max` | `number | undefined` | — | The maximum progress value. |
| `getValueLabel` | `((value: number | null | undefined, max: number) => string | undefined) | undefined` | — | A function to get the accessible label text in a human-readable format.\
If not provided, the value label will be read as the numeric value as a percentage of the max value. |
| `getValueText` | `((value: number | null | undefined, max: number) => string | undefined) | undefined` | — | A function to get the accessible value text representing the current value in a human-readable format. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `showValue` | `boolean | undefined` | `true` | 設為 \`false\` 時隱藏中央百分比文字 |
::
## 更新紀錄
:admin-changelog{component="AdminProgress"}
# Radio Group
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/radio-group
```
```ts
import {
AdminRadioGroup,
AdminRadioGroupItem,
AdminRadioOption,
} from '@/components/admin/radio-group'
```
## 用法
```vue
```
## 場景
### 多選項群組
```vue
```
### 停用狀態
```vue
```
## Type-safe 封裝
`AdminRadioGroup` 的 `modelValue` 為 reka-ui 的 `AcceptableValue`,選項則由呼叫端自行放置 `admin-radio-option`,兩者在 compile-time 不會對齊。
若需要讓 `v-model` 與選項 `value` 的 literal union 對齊,可自行封裝:傳入 `options`(建議加 `as const`),由封裝元件渲染 `admin-radio-option`。
範例:
```vue
```
::alert{title="需開啟 strictVModel" type="info"}
型別檢查需開啟 `strictVModel`(若已開啟 `strictTemplates` 則已包含)。設定見 [Type-safe](https://component-registry-4d4d86.gitlab.io/docs/get-started/type-safe)。下列同時含合法綁定與刻意錯誤綁定;錯誤處以 `@vue-expect-error` 標示。
::
```vue
```
## API 參考
### 組成
```vue
```
### admin-radio-group
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| -------------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `modelValue` | `AcceptableValue | undefined` | — | The controlled value of the radio item to check. Can be binded as \`v-model\`. |
| `defaultValue` | `AcceptableValue | undefined` | — | The value of the radio item that should be checked when initially rendered.\
Use when you do not need to control the state of the radio items. |
| `disabled` | `boolean | undefined` | — | When \`true\`, prevents the user from interacting with radio items. |
| `orientation` | `DataOrientation | undefined` | — | The orientation of the component. |
| `dir` | `Direction | undefined` | — | The reading direction of the combobox when applicable. \
If omitted, inherits globally from \`ConfigProvider\` or assumes LTR (left-to-right) reading mode. |
| `loop` | `boolean | undefined` | — | When \`true\`, keyboard navigation will loop from last item to first, and vice versa. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `name` | `string | undefined` | — | The name of the field. Submitted with its owning form as part of a name/value pair. |
| `required` | `boolean | undefined` | — | When \`true\`, indicates that the user must set the value before the owning form can be submitted. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `isError` | `boolean | undefined` | — | 預留之錯誤狀態旗標(目前無對應視覺實作) |
#### Events
| 名稱 | Payload | 說明 |
| ------------------- | ----------------- | -- |
| `update:modelValue` | `AcceptableValue` | — |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | ---------------------------------------------- | -- |
| `default` | `{ modelValue: AcceptableValue | undefined; }` | — |
::
### admin-radio-group-item
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ---------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id` | `string | undefined` | — | — |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `asChild` | `boolean | 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. |
| `required` | `boolean | undefined` | — | When \`true\`, indicates that the user must set the value before the owning form can be submitted. |
| `disabled` | `boolean | undefined` | — | When \`true\`, prevents the user from interacting with the radio item. |
| `name` | `string | undefined` | — | The name of the field. Submitted with its owning form as part of a name/value pair. |
| `value` | `AcceptableValue | undefined` | — | The value given as data when submitted with a \`name\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-radio-option
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------ | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id` | `string | undefined` | — | — |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `asChild` | `boolean | 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. |
| `required` | `boolean | undefined` | — | When \`true\`, indicates that the user must set the value before the owning form can be submitted. |
| `disabled` | `boolean | undefined` | — | When \`true\`, prevents the user from interacting with the radio item. |
| `name` | `string | undefined` | — | The name of the field. Submitted with its owning form as part of a name/value pair. |
| `value` | `AcceptableValue | undefined` | — | The value given as data when submitted with a \`name\`. |
| `label` | `string | undefined` | — | 顯示於選項旁之文字標籤;不設則不渲染 label |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `labelClass` | `ClassValue` | — | label 文字之自訂 class |
::
## 更新紀錄
:admin-changelog{component="AdminRadioGroup"}
# Scroll Area
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/scroll-area
```
```ts
import { AdminScrollArea, AdminScrollBar } from '@/components/admin/scroll-area'
```
## 用法
```vue
Row {{ i }}
```
## 場景
### 水平捲動
```vue
```
## API 參考
### 組成
```vue
內容
```
### admin-scroll-area
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ----------------- | ------------------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `type` | `ScrollType | undefined` | — | Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars.\
\`auto\` - means that scrollbars are visible when content is overflowing on the corresponding orientation. \
\`always\` - means that scrollbars are always visible regardless of whether the content is overflowing.\
\`scroll\` - means that scrollbars are visible when the user is scrolling along its corresponding orientation.\
\`hover\` - when the user is scrolling along its corresponding orientation and when the user is hovering over the scroll area.\
\`glimpse\` - a hybrid approach that briefly shows scrollbars when the user enters the scroll area, then hides them until further interaction. |
| `dir` | `Direction$2 | undefined` | — | The reading direction of the combobox when applicable. \
If omitted, inherits globally from \`ConfigProvider\` or assumes LTR (left-to-right) reading mode. |
| `scrollHideDelay` | `number | undefined` | — | If type is set to either \`scroll\` or \`hover\`, this prop determines the length of time, in milliseconds, \
before the scrollbars are hidden after the user stops interacting with scrollbars. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-scroll-bar
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------- | ------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `orientation` | `"horizontal" | "vertical" | undefined` | `"vertical"` | The orientation of the scrollbar |
| `forceMount` | `boolean | undefined` | — | Used to force mounting when more control is needed. Useful when\
controlling animation with Vue animation libraries. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
::
## 更新紀錄
:admin-changelog{component="AdminScrollArea"}
# Select
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/select
```
```ts
import {
AdminSelect,
AdminSelectAnchor,
AdminSelectCancel,
AdminSelectCounter,
AdminSelectEmpty,
AdminSelectGroup,
AdminSelectIcon,
AdminSelectInput,
AdminSelectItem,
AdminSelectItemIndicator,
AdminSelectList,
AdminSelectSeparator,
AdminSelectTags,
AdminSelectTrigger,
AdminSelectValue,
AdminSelectViewport,
} from '@/components/admin/select'
```
## 用法
```vue
{{ option.label }}
```
## 場景
### 多選
```vue
{{ option.label }}
```
### 可搜尋
```vue
找不到符合的城市
{{ option.label }}
```
### 錯誤狀態
```vue
{{ option.label }}
```
### 完整組合
子元件:anchor、trigger(tags/value/counter/icon)、list、input(含 cancel)、viewport、empty、group(heading)、separator、item(含 item-indicator)。
```vue
找不到符合的項目
{{ option.label }}
{{ option.label }}
```
## Type-safe 封裝
`AdminSelect` 已是 generic(`T extends AcceptableValue`),可直接以較嚴的 `v-model` 受益。若要讓 `v-model` 與選項清單的 literal union 對齊,可自行封裝:傳入 `options`(建議加 `as const`),由封裝元件以物件為 value 渲染 item,並以 `displayValue` 顯示 label。
封裝再以 `multiple` 為條件式泛型的 discriminant:`multiple` 時 `v-model` 型別收斂為選項陣列、未開時為單一選項,兩種模式共用同一個封裝元件。
範例:
```vue
{{ option.label }}
```
::alert{title="需開啟 strictVModel" type="info"}
型別檢查需開啟 `strictVModel`(若已開啟 `strictTemplates` 則已包含)。設定見 [Type-safe](https://component-registry-4d4d86.gitlab.io/docs/get-started/type-safe)。下列同時含合法綁定與刻意錯誤綁定;錯誤處以 `@vue-expect-error` 標示。
::
```vue
```
## API 參考
### 組成
```vue
無結果
{{ o.label }}
```
### admin-select
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------------------- | -------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `class` | `unknown` | — | — |
| `open` | `boolean | undefined` | — | The controlled open state of the Combobox. Can be binded with \`v-model\:open\`. |
| `defaultOpen` | `boolean | undefined` | — | The open state of the combobox when it is initially rendered. \
Use when you do not need to control its open state. |
| `resetSearchTermOnBlur` | `boolean | undefined` | `` `true` `` | Whether to reset the searchTerm when the Combobox input blurred |
| `resetSearchTermOnSelect` | `boolean | undefined` | `` `true` `` | Whether to reset the searchTerm when the Combobox value is selected |
| `openOnFocus` | `boolean | undefined` | `` `false` `` | Whether to open the combobox when the input is focused |
| `openOnClick` | `boolean | undefined` | `` `false` `` | Whether to open the combobox when the input is clicked |
| `ignoreFilter` | `boolean | undefined` | — | When \`true\`, disable the default filters |
| `resetModelValueOnClear` | `boolean | undefined` | — | When \`true\` the \`modelValue\` will be reset to \`null\` (or \`\[]\` if \`multiple\`) |
| `modelValue` | `TModelValue | TModelValue[] | undefined` | — | The controlled value of the listbox. Can be binded with \`v-model\`. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `asChild` | `boolean | 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. |
| `required` | `boolean | undefined` | — | When \`true\`, indicates that the user must set the value before the owning form can be submitted. |
| `disabled` | `boolean | undefined` | — | When \`true\`, prevents the user from interacting with listbox |
| `dir` | `Direction | undefined` | — | The reading direction of the listbox when applicable. \
If omitted, inherits globally from \`ConfigProvider\` or assumes LTR (left-to-right) reading mode. |
| `defaultValue` | `TModelValue | TModelValue[] | undefined` | — | The value of the listbox when initially rendered. Use when you do not need to control the state of the Listbox |
| `name` | `string | undefined` | — | The name of the field. Submitted with its owning form as part of a name/value pair. |
| `multiple` | `boolean | undefined` | — | Whether multiple options can be selected or not. |
| `highlightOnHover` | `boolean | undefined` | — | When \`true\`, hover over item will trigger highlight |
| `by` | `string | ((a: TModelValue, b: TModelValue) => boolean) | undefined` | — | Use this to compare objects by a particular field, or pass your own comparison function for complete control over how objects are compared. |
| `deselectable` | `boolean | undefined` | `true` | 已選中之選項是否可再次點擊取消選取 |
| `isError` | `boolean | undefined` | `false` | 設為 \`true\` 時為 trigger 套用錯誤狀態邊框 |
| `displayValue` | `((value: TModelValue) => string) | undefined` | — | 將已選 value 轉成 trigger/tags 顯示文案;未提供時 fallback 為 \`String(value)\` |
#### Events
| 名稱 | Payload | 說明 |
| ------------------- | ------------------------------------------------------- | -- |
| `update:modelValue` | `TModelValue` | — |
| `update:open` | `boolean` | — |
| `highlight` | `{ ref: HTMLElement; value: TModelValue; } | undefined` | — |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | ------------------------------------------------------------- | -- |
| `default` | `{ open: boolean; modelValue: TModelValue | TModelValue[]; }` | — |
::
### admin-select-anchor
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ----------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `reference` | `ReferenceElement | undefined` | — | The reference (or anchor) element that is being referred to for positioning.\
If not provided will use the current component as anchor. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-select-trigger
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ---------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `disabled` | `boolean | undefined` | — | When \`true\`, prevents the user from interacting with item |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-select-value
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------- | -------------------- | --- | ------------- |
| `placeholder` | `string | undefined` | — | 未選取選項時顯示之提示文字 |
| `class` | `ClassValue` | — | 根元素之自訂 class |
::
### admin-select-icon
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
::
### admin-select-list
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ----------------------------- | ----------------------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `forceMount` | `boolean | undefined` | — | Used to force mounting when more control is needed. Useful when\
controlling animation with Vue animation libraries. |
| `position` | `"inline" | "popper" | undefined` | `"popper"` | The positioning mode to use, \
\`inline\` is the default and you can control the position using CSS. \
\`popper\` positions content in the same way as our other primitives, for example \`Popover\` or \`DropdownMenu\`. |
| `bodyLock` | `boolean | undefined` | — | The document.body will be lock, and scrolling will be disabled. |
| `hideWhenEmpty` | `boolean | undefined` | `false` | When \`true\`, hides the content when there are no items matching the filter. |
| `memoDependencies` | `unknown[] | undefined` | — | Reactive dependencies that should invalidate the memoized content subtree. |
| `side` | `"top" | "right" | "bottom" | "left" | undefined` | `"bottom"` | The preferred side of the trigger to render against when open.\
Will be reversed when collisions occur and avoidCollisions\
is enabled. |
| `sideOffset` | `number | undefined` | `4` | The distance in pixels from the trigger. |
| `sideFlip` | `boolean | undefined` | `true` | Flip to the opposite side when colliding with boundary. |
| `align` | `"start" | "end" | "center" | undefined` | `"start"` | The preferred alignment against the trigger.\
May change when collisions occur. |
| `alignOffset` | `number | undefined` | `0` | An offset in pixels from the \`start\` or \`end\` alignment options. |
| `alignFlip` | `boolean | undefined` | `true` | Flip alignment when colliding with boundary.\
May only occur when \`prioritizePosition\` is true. |
| `avoidCollisions` | `boolean | undefined` | `true` | When \`true\`, overrides the side and align preferences\
to prevent collisions with boundary edges. |
| `collisionBoundary` | `Element | (Element | null)[] | null | undefined` | `[]` | The element used as the collision boundary. By default\
this is the viewport, though you can provide additional\
element(s) to be included in this check. |
| `collisionPadding` | `number | Partial
> | undefined` | `0` | The distance in pixels from the boundary edges where collision\
detection should occur. Accepts a number (same for all sides),\
or a partial padding object, for example: { top: 20, left: 20 }. |
| `arrowPadding` | `number | undefined` | `0` | The padding between the arrow and the edges of the content.\
If your content has border-radius, this will prevent it from\
overflowing the corners. |
| `hideShiftedArrow` | `boolean | undefined` | `true` | When \`true\`, hides the arrow when it cannot be centered\
to the reference element. |
| `sticky` | `"partial" | "always" | undefined` | `"partial"` | The sticky behavior on the align axis. \`partial\` will keep the\
content in the boundary as long as the trigger is at least partially\
in the boundary whilst "always" will keep the content in the boundary\
regardless. |
| `hideWhenDetached` | `boolean | undefined` | `false` | Whether to hide the content when the trigger becomes fully occluded. |
| `positionStrategy` | `"fixed" | "absolute" | undefined` | — | The type of CSS position property to use. |
| `updatePositionStrategy` | `"always" | "optimized" | undefined` | `'optimized'` | Strategy to update the position of the floating element on every animation frame. |
| `disableUpdateOnLayoutShift` | `boolean | undefined` | `false` | Whether to disable the update position for the content when the layout shifted. |
| `prioritizePosition` | `boolean | undefined` | `false` | Force content to be position within the viewport.\
Might overlap the reference element, which may not be desired. |
| `reference` | `ReferenceElement | undefined` | — | The custom element or virtual element that will be set as the reference\
to position the floating element.\
If provided, it will replace the default anchor element. |
| `dir` | `Direction | undefined` | — | The reading direction of the popper content when applicable. \
If omitted, inherits globally from \`ConfigProvider\` or assumes LTR (left-to-right) reading mode. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `disableOutsidePointerEvents` | `boolean | undefined` | — | When \`true\`, hover/focus/click interactions will be disabled on elements outside\
the \`DismissableLayer\`. Users will need to click twice on outside elements to\
interact with them: once to close the \`DismissableLayer\`, and again to trigger the element. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `to` | `string | HTMLElement | undefined` | — | 指定 ComboboxPortal 之掛載目標 |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-select-viewport
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `nonce` | `string | undefined` | — | Will add \`nonce\` attribute to the style tag which can be used by Content Security Policy. \
If omitted, inherits globally from \`ConfigProvider\`. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-select-input
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| -------------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `displayValue` | `((val: any) => string) | undefined` | — | The display value of input for selected item. Does not work with \`multiple\`. |
| `modelValue` | `string | undefined` | — | The controlled value of the filter. Can be binded with v-model. |
| `autoFocus` | `boolean | undefined` | — | Focus on element when mounted. |
| `disabled` | `boolean | undefined` | — | When \`true\`, prevents the user from interacting with item |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `placeholder` | `string | undefined` | — | 搜尋輸入框之提示文字 |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `icon` | `{}` | — |
| `default` | `{}` | — |
::
### admin-select-cancel
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-select-empty
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-select-group
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `heading` | `string | undefined` | — | 群組標題;提供時於群組頂部渲染 ComboboxLabel |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-select-item
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ----------- | ------------------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `textValue` | `string | undefined` | — | A string representation of the item contents.\
If the children are not plain text, then the \`textValue\` prop must also be set to a plain text representation, which will be used for autocomplete in the ComboBox. |
| `value`\* | `AcceptableValue` | — | The value given as data when submitted with a \`name\`. |
| `disabled` | `boolean | undefined` | — | When \`true\`, prevents the user from interacting with the item. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
*\\\* 代表必填*
#### Events
| 名稱 | Payload | 說明 |
| -------- | -------------------------------- | -- |
| `select` | `SelectEvent$3` | — |
#### Slots
| 名稱 | Bindings | 說明 |
| ----------- | -------- | -- |
| `default` | `{}` | — |
| `indicator` | `{}` | — |
::
### admin-select-item-indicator
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-select-separator
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
::
### admin-select-tags
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ---------- | ------------ | --- | ---------------- |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `tagClass` | `ClassValue` | — | 單一 tag 之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------------------------------------------------- | -- |
| `default` | `{ option: AcceptableValue; remove: () => void; }` | — |
::
### admin-select-counter
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | -------------------- | ---- | ------------ |
| `max` | `number | undefined` | `99` | 顯示計數之上限數字 |
| `class` | `ClassValue` | — | 根元素之自訂 class |
::
## 注意事項
- **trigger 需以 `` 包覆**:anchor 為 popper 定位錨點,list 的展開位置與寬度以 anchor 為參考;欲設定下拉寬度請把寬度 class 下在 `` 上。
- **搜尋輸入固定於 list 頂部**:`` 放在 `` 內、`` 之外時會固定不隨清單捲動;item 清單放入 `` 提供捲動。
- **物件 value 請設 `by`**:`v-model` 綁 option 物件時,建議 `by="value"`(或自訂比較函式),並以 `:display-value` 決定 trigger/tags 文案。
- **單選的 `deselectable`**:預設 `true`,再次點擊已選項目會清空選擇並關閉下拉;不需此行為時於 root 設 `deselectable=false`。
- **搜尋過濾的 label 來源**:過濾依據是每顆 `` 的 `textContent`;若 item 內嵌入 icon / 圖片等非文字節點,建議透過 `text-value` prop 顯式指定可被過濾的字串。
## 更新紀錄
:admin-changelog{component="AdminSelect"}
# Side Menu
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/side-menu
```
```ts
import {
AdminSideMenu,
AdminSideMenuContent,
AdminSideMenuFooter,
AdminSideMenuGroup,
AdminSideMenuGroupAction,
AdminSideMenuGroupContent,
AdminSideMenuGroupLabel,
AdminSideMenuHeader,
AdminSideMenuInput,
AdminSideMenuInset,
AdminSideMenuList,
AdminSideMenuListAction,
AdminSideMenuListBadge,
AdminSideMenuListButton,
AdminSideMenuListButtonChild,
AdminSideMenuListItem,
AdminSideMenuListSkeleton,
AdminSideMenuListSub,
AdminSideMenuListSubButton,
AdminSideMenuListSubItem,
AdminSideMenuProvider,
AdminSideMenuRail,
AdminSideMenuSeparator,
AdminSideMenuTrigger,
useSideMenu,
} from '@/components/admin/side-menu'
```
## 用法
外層需先以 `admin-side-menu-provider` 提供 context,再以 `admin-side-menu` 結合 group / list / item / button 組合導覽結構。
```vue
Dashboard
Components
Button
Input
Dialog
Settings
```
## 場景
### 基本結構
```vue
{{ item.label }}
```
### 完整組成
header/footer/group-label/group-action/list-badge/list-action/separator/input/skeleton。
```vue
導覽
{{ item.label }}
{{
item.badge
}}
載入中
帳號
```
### 變體與收合
`variant`:`default`/`floating`/`inset`;`collapsible`:`icon`/`offcanvas`。以 `admin-side-menu-trigger` 或 `admin-side-menu-rail` 切換展開/收合。
```vue
{{ item.label }}
{{
item.badge
}}
切換上方 variant / collapsible,或點左上角按鈕與側邊 rail 觀察收合效果。mobileSheet
僅在瀏覽器視窗寬度 < 768px 時生效:true 於手機以 Sheet 呈現,false 則維持電腦版
offcanvas 樣式。
```
## API 參考
### 組成
```vue
導覽項目
主內容
```
### admin-side-menu
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------- | ---------------------------------------------- | ----------- | -------------------------------- |
| `side` | `"right" | "left" | undefined` | `"left"` | 側選單對齊方向 |
| `variant` | `"default" | "inset" | "floating" | undefined` | `"default"` | 視覺樣式變體 |
| `collapsible` | `"none" | "icon" | "offcanvas" | undefined` | `"icon"` | 收合行為(offcanvas / icon / none 之一) |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | --------------------------------------------------------- | -- |
| `default` | `{ isMobile: boolean; state: "expanded" | "collapsed"; }` | — |
::
### admin-side-menu-content
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------------------------------------- | -- |
| `default` | `{ state: "expanded" | "collapsed"; }` | — |
::
### admin-side-menu-group
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-inset
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-list
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-list-button
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ---------- | ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | undefined` | `false` | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"button"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `isActive` | `boolean | undefined` | `false` | 設為 \`true\` 時套用 active 狀態樣式 |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `tooltip` | `string | globalThis.Component | undefined` | — | 收合狀態(collapsed icon-only)時顯示之 tooltip 文字或元件 |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-list-button-child
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ---------- | ------------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"button"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `isActive` | `boolean | undefined` | — | 設為 \`true\` 時套用 active 狀態樣式 |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-list-item
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-list-sub
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-list-sub-button
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ---------- | ------------------------------------------ | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"a"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `isActive` | `boolean | undefined` | — | 設為 \`true\` 時套用 active 狀態樣式 |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-list-sub-item
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-provider
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------- | --------------------- | ------ | --------------------------------------------------------------------------------------------------- |
| `defaultOpen` | `boolean | undefined` | `true` | uncontrolled 模式之初始開啟狀態 |
| `open` | `boolean | undefined` | — | controlled 模式之開啟狀態(以 \`v-model\:open\` 綁定) |
| `mobileSheet` | `boolean | undefined` | `true` | 手機(\`< 768px\`)是否以 Sheet 渲染;設為 \`false\` 時關閉手機 Sheet,所有 variant/collapsible 在全寬度維持電腦版樣式,預設 \`true\` |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Events
| 名稱 | Payload | 說明 |
| ------------- | --------- | --------- |
| `update:open` | `boolean` | 開啟狀態變更時觸發 |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-trigger
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"button"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-rail
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-header
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-footer
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-group-label
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | undefined` | `false` | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-group-content
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-group-action
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | undefined` | `false` | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"button"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-list-action
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------- | ------------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | undefined` | `false` | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"button"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `showOnHover` | `boolean | undefined` | `false` | 設為 \`true\` 時僅在項目 hover / focus / 開啟狀態顯示 |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-list-badge
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-side-menu-input
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
::
### admin-side-menu-separator
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | ------------ | --- | ------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
::
### admin-side-menu-list-skeleton
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ---------- | --------------------- | ------- | ------------------------------------- |
| `showIcon` | `boolean | undefined` | `false` | 是否顯示前置 icon 佔位 |
| `width` | `string | undefined` | `"70%"` | 文字佔位寬度(固定值,避免 SSR hydration mismatch) |
| `class` | `ClassValue` | — | 根元素之自訂 class |
::
## 更新紀錄
:admin-changelog{component="AdminSideMenu"}
# Stepper
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/stepper
```
```ts
import {
AdminStepper,
AdminStepperDescription,
AdminStepperIndicator,
AdminStepperItem,
AdminStepperSeparator,
AdminStepperTitle,
AdminStepperTrigger,
} from '@/components/admin/stepper'
```
## 用法
```vue
{{ s.value }}
{{ s.title }}
```
## 場景
### 線性三步驟
```vue
{{ s.value }}
{{ s.title }}
```
### 停用尚未開放的步驟
```vue
1
已完成
2
進行中
3
尚未開放
```
### 步驟附說明文字
```vue
{{ s.value }}
{{ s.title }}
{{ s.description }}
```
## API 參考
### 組成
```vue
1
2
步驟二
```
### admin-stepper
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| -------------- | ------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `defaultValue` | `number | undefined` | — | The value of the step that should be active when initially rendered. Use when you do not need to control the state of the steps. |
| `orientation` | `DataOrientation | undefined` | `horizontal` | The orientation the steps are laid out.\
Mainly so arrow navigation is done accordingly (left & right vs. up & down). |
| `dir` | `Direction | undefined` | — | The reading direction of the combobox when applicable. \
If omitted, inherits globally from \`ConfigProvider\` or assumes LTR (left-to-right) reading mode. |
| `modelValue` | `number | undefined` | — | The controlled value of the step to activate. Can be bound as \`v-model\`. |
| `linear` | `boolean | undefined` | — | Whether or not the steps must be completed in order. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Events
| 名稱 | Payload | 說明 |
| ------------------- | -------------------- | -- |
| `update:modelValue` | `number | undefined` | — |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-stepper-item
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ----------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `step`\* | `number` | — | A unique value that associates the stepper item with an index |
| `disabled` | `boolean | undefined` | — | When \`true\`, prevents the user from interacting with the step. |
| `completed` | `boolean | undefined` | — | Shows whether the step is completed. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
*\\\* 代表必填*
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------------------------- | -- |
| `default` | `{ state: StepperState; }` | — |
::
### admin-stepper-trigger
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-stepper-indicator
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | ------------------- | -- |
| `default` | `{ step: number; }` | — |
::
### admin-stepper-title
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-stepper-description
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-stepper-separator
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `orientation` | `DataOrientation | undefined` | — | Orientation of the component.\
Either \`vertical\` or \`horizontal\`. Defaults to \`horizontal\`. |
| `decorative` | `boolean | undefined` | — | Whether 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. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
::
## 更新紀錄
:admin-changelog{component="AdminStepper"}
# Switch
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/switch
```
```ts
import { AdminSwitch } from '@/components/admin/switch'
```
## 用法
```vue
```
## 場景
### 帶文字標籤
```vue
```
### 停用狀態
```vue
```
## API 參考
### 組成
```vue
```
### admin-switch
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `defaultValue` | `boolean | undefined` | — | The state of the switch when it is initially rendered. Use when you do not need to control its state. |
| `modelValue` | `boolean | null | undefined` | — | The controlled state of the switch. Can be bind as \`v-model\`. |
| `disabled` | `boolean | undefined` | — | When \`true\`, prevents the user from interacting with the switch. |
| `id` | `string | undefined` | — | — |
| `value` | `string | undefined` | — | The value given as data when submitted with a \`name\`. |
| `trueValue` | `boolean | undefined` | — | The value used when the switch is on. Defaults to \`true\`. |
| `falseValue` | `boolean | undefined` | — | The value used when the switch is off. Defaults to \`false\`. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `name` | `string | undefined` | — | The name of the field. Submitted with its owning form as part of a name/value pair. |
| `required` | `boolean | undefined` | — | When \`true\`, indicates that the user must set the value before the owning form can be submitted. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `checkedText` | `string | undefined` | — | 開啟狀態顯示的文字(亦可用 \`#checkedText\` slot) |
| `uncheckedText` | `string | undefined` | — | 關閉狀態顯示的文字(亦可用 \`#uncheckedText\` slot) |
| `isError` | `boolean | undefined` | — | 設為 \`true\` 時套用錯誤狀態樣式(顯示 \`data-is-error\` 屬性供樣式 hook) |
#### Events
| 名稱 | Payload | 說明 |
| ------------------- | --------- | -- |
| `update:modelValue` | `boolean` | — |
#### Slots
| 名稱 | Bindings | 說明 |
| --------------- | -------------------------- | --------------------------------------- |
| `checkedText` | `any` | 自訂開啟狀態文字內容(取代 \`checkedText\` prop) |
| `uncheckedText` | `any` | 自訂關閉狀態文字內容(取代 \`uncheckedText\` prop) |
| `thumb` | `{ modelValue: boolean; }` | 自訂 thumb 內容,bindings 含當前 \`modelValue\` |
::
## 更新紀錄
:admin-changelog{component="AdminSwitch"}
# Tabs
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/tabs
```
```ts
import {
AdminTabs,
AdminTabsContent,
AdminTabsList,
AdminTabsTrigger,
} from '@/components/admin/tabs'
```
## 用法
```vue
Account
Password
Account panel
Password panel
```
## 場景
### 受控模式
```vue
Account
Password
Account panel
Password panel
```
## Type-safe 封裝
`AdminTabs` 已是 generic(`T extends StringOrNumber`),以較嚴的 ref 綁定 `v-model` 即可收斂為 tab value 的 literal union。若要讓 value 與清單對齊、並讓每個 tab 的內容仍保有完整彈性,可自行封裝:傳入 `items`(建議加 `as const`),由封裝元件以 `items` 為單一事實來源渲染各 trigger 與 content shell,content 由使用端以 `#panel-` 具名 slot 填入。
如此 `items` 即聯集來源,各 trigger 的 `value` 結構上不可能越界;型別安全落在 `v-model` 與 `defaultValue` 必須對齊 `items` 的 value union(允許 `undefined` 表未選)。封裝再以 `defineSlots` 將 content slot 收斂為 `panel-` 聯集,填入不在清單內的 slot 名亦會編譯期報錯。
> 此食譜刻意精簡,未透出 trigger 的 `badge`/`badgeValue`;需要時可自行 fork 擴充。封裝元件僅為文件示範,不屬 registry 安裝產物。
```vue
{{ item.label }}
```
::alert{title="需開啟 strictVModel" type="info"}
型別檢查需開啟 `strictVModel`(若已開啟 `strictTemplates` 則已包含)。設定見 [Type-safe](https://component-registry-4d4d86.gitlab.io/docs/get-started/type-safe)。下列同時含合法綁定與刻意錯誤綁定;錯誤處以 `@vue-expect-error` 標示。
::
```vue
總覽內容
設定內容
總覽內容
設定內容
總覽內容
設定內容
總覽內容
設定內容
不存在的 slot
```
## API 參考
### 組成
```vue
概覽
明細
概覽內容
明細內容
```
### admin-tabs
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ---------------- | ------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `defaultValue` | `TModelValue | undefined` | — | The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs |
| `orientation` | `DataOrientation | undefined` | `horizontal` | The orientation the tabs are laid out.\
Mainly so arrow navigation is done accordingly (left & right vs. up & down) |
| `dir` | `Direction | undefined` | — | The reading direction of the combobox when applicable. \
If omitted, inherits globally from \`ConfigProvider\` or assumes LTR (left-to-right) reading mode. |
| `activationMode` | `"automatic" | "manual" | undefined` | `automatic` | Whether a tab is activated automatically (on focus) or manually (on click). |
| `modelValue` | `TModelValue | undefined` | — | The controlled value of the tab to activate. Can be bind as \`v-model\`. |
| `unmountOnHide` | `boolean | undefined` | `` `true` `` | When \`true\`, the element will be unmounted on closed state. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `size` | `"xs" | "sm" | undefined` | `"xs"` | tabs trigger 尺寸(透過 context 傳遞給所有 trigger) |
#### Events
| 名稱 | Payload | 說明 |
| ------------------- | ------------- | -- |
| `update:modelValue` | `TModelValue` | — |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-tabs-list
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| --------- | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `loop` | `boolean | undefined` | — | When \`true\`, keyboard navigation will loop from last tab to first, and vice versa. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-tabs-trigger
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------ | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `value`\* | `StringOrNumber` | — | A unique value that associates the trigger with a content. |
| `disabled` | `boolean | undefined` | — | When \`true\`, prevents the user from interacting with the tab. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `badge` | `boolean | undefined` | `false` | 設為 \`true\` 時於 trigger 右側顯示 badge |
| `badgeValue` | `number | undefined` | — | badge 顯示的數字(搭配 \`badge: true\` 使用) |
*\\\* 代表必填*
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-tabs-content
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------ | ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `value`\* | `StringOrNumber` | — | A unique value that associates the content with a trigger. |
| `forceMount` | `boolean | undefined` | — | Used to force mounting when more control is needed. Useful when\
controlling animation with Vue animation libraries. |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"div"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `class` | `ClassValue` | — | 根元素之自訂 class |
*\\\* 代表必填*
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
## 更新紀錄
:admin-changelog{component="AdminTabs"}
# Tag
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/tag
```
```ts
import { AdminTag } from '@/components/admin/tag'
```
## 用法
```vue
```
## 場景
### 圓角變體
```vue
```
### 搭配 icon
```vue
```
## API 參考
### 組成
```vue
標籤文字
```
### admin-tag
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ---------- | ---------------------------------------------- | --- | --------------------- |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `rounded` | `"round-filled" | "square-filled" | undefined` | — | 圓角樣式變體 |
| `closable` | `boolean | undefined` | — | 設為 \`true\` 時顯示右側關閉按鈕 |
#### Events
| 名稱 | Payload | 說明 |
| ------- | ------- | ----------- |
| `close` | — | 點擊右側關閉按鈕時觸發 |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
## 更新紀錄
:admin-changelog{component="AdminTag"}
# Textarea
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/textarea
```
```ts
import {
AdminTextarea,
AdminTextareaWordLimit,
} from '@/components/admin/textarea'
```
## 用法
```vue
```
## 場景
### 帶字數限制
```vue
```
### 停用狀態
```vue
```
### 錯誤狀態
```vue
```
## API 參考
### 組成
```vue
```
### admin-textarea
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| -------------- | --------------------- | ------- | ---------------------------------------------- |
| `defaultValue` | `string | undefined` | — | 初始值(非控制模式) |
| `modelValue` | `string | undefined` | — | 受控值,以 \`v-model\` 綁定 |
| `placeholder` | `string | undefined` | — | 預設提示文字 |
| `disabled` | `boolean | undefined` | — | 設為 \`true\` 時禁用輸入並套用視覺停用樣式 |
| `maxlength` | `number | undefined` | — | 限制最大字元數(並由 \`admin-textarea-word-limit\` 顯示計數) |
| `class` | `ClassValue` | — | 根元素之自訂 class |
| `isError` | `boolean | undefined` | `false` | 設為 \`true\` 時套用錯誤狀態樣式與 \`aria-invalid\` |
| `id` | `string | undefined` | — | 透傳至內層 \`textarea\` 之 \`id\`;純透傳,未提供時不自動生成 |
| `name` | `string | undefined` | — | 透傳至內層 \`textarea\` 之 \`name\`,供原生表單提交使用 |
#### Events
| 名稱 | Payload | 說明 |
| ------------------- | ------------ | ---------------------------------------------------- |
| `blur` | `FocusEvent` | 內層 \`textarea\` 失焦時轉發之原生事件 |
| `change` | `Event` | 內層 \`textarea\` 觸發原生 \`change\`(值變更並 commit)時轉發之原生事件 |
| `input` | `Event` | 內層 \`textarea\` 觸發原生 \`input\`(每次輸入)時轉發之原生事件 |
| `update:modelValue` | `string` | — |
#### Slots
| 名稱 | Bindings | 說明 |
| -------- | -------- | -- |
| `footer` | `{}` | — |
#### Expose
| 名稱 | 簽名 | 說明 |
| ------------- | ---------------------------- | --------------------------------------------------------------- |
| `textareaRef` | `HTMLTextAreaElement | null` | 內部原生 textarea 元素之 template ref,可用於程式化 focus / blur / select 等操作 |
::
### admin-textarea-word-limit
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------- | --------- | --- | -- |
| `class` | `unknown` | — | — |
::
## 更新紀錄
:admin-changelog{component="AdminTextarea"}
# Timeline
## 安裝
```bash [Terminal] icon=i-lucide-terminal
pnpm dlx shadcn-vue add @admin/timeline
```
```ts
import {
AdminTimeline,
AdminTimelineContent,
AdminTimelineDate,
AdminTimelineHeader,
AdminTimelineIndicator,
AdminTimelineItem,
AdminTimelineSeparator,
AdminTimelineTitle,
} from '@/components/admin/timeline'
```
## 用法
```vue
{{ event.label }}
{{ event.title }}
{{ event.content }}
```
## 場景
### 自訂 indicator(icon)
```vue
{{ event.label }}
{{ event.title }}
```
### 水平 orientation
```vue
{{ s.date }}
{{ s.title }}
```
## API 參考
### 組成
```vue
2026/05/01
建立訂單
```
### admin-timeline
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ------------- | --------------------------------- | ------------ | ------------ |
| `orientation` | `TimelineOrientation | undefined` | `"vertical"` | 時間軸方向 |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-timeline-item
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| -------- | -------------------------------- | ----------- | --------------------------------------- |
| `status` | `TimelineItemStatus | undefined` | `"pending"` | 該 item 的狀態;決定 indicator 與 separator 的配色 |
| `class` | `ClassValue` | — | 根元素之自訂 class |
#### Slots
| 名稱 | Bindings | 說明 |
| --------- | -------- | -- |
| `default` | `{}` | — |
::
### admin-timeline-date
::div{data-admin-api-table=""}
#### Props
| 名稱 | 型別 | 預設值 | 說明 |
| ---------- | ------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asChild` | `boolean | 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. |
| `as` | `globalThis.Component | AsTag | undefined` | `"time"` | The element or component this component should render as. Can be overwritten by \`asChild\`. |
| `datetime` | `string | undefined` | — | 對應 \`\