llms.txt@packages/tao-ui ยท diff
git:20261104.e34bc32 to git:20261105.5ce210b
18 added, 15 removed. Audit A to A.
What this update changes in the checks
No check changed: every fixed check gives the same answer before and after this update.
A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.
# @rockshin/tao-ui
> A component library for React 18.2 and 19 with semantic DOM customization and OKLCH-based theming.
## Install
```bash
npm install @rockshin/tao-ui
```
Peer dependencies: `react ^18.2.0 || ^19.0.0`, `react-dom ^18.2.0 || ^19.0.0`. Minimum version: React and React DOM 18.2; React 19 is also supported.
`dayjs` is a regular dependency and is installed automatically.
Import components from subpaths such as `@rockshin/tao-ui/button` and `TaoProvider` from `@rockshin/tao-ui/provider` to load only their component dependencies and shared theme styles. No separate CSS import is needed.
The package root remains available and includes all component styles.
## Core Concepts
- `TaoProvider` supplies size, disabled, variant, portal scope, and theme seed token defaults.
- Components expose semantic DOM customization through `classNames` and `styles` props.
- Theme tokens are CSS custom properties prefixed with `--tao-*`; import `tokenVar(name)` and `taoTokenNames` from `@rockshin/tao-ui/tokens`.
- Import `componentDocs` and `getComponentDoc(name)` from `@rockshin/tao-ui/meta` for machine-readable component metadata.
+ - Resolve `@rockshin/tao-ui/component-manifest.json` for plain JSON without loading component code.
+ - [Agent guide](https://rickyshin93.github.io/tao-ui/guide/agents.md): read contracts, choose imports, and verify generated code.
+ - [Website discovery index](https://rickyshin93.github.io/tao-ui/agent-manifest.json): current website version and bilingual Markdown/API links. Match it to your installed version.
## Component Groups
- Config: App, TaoProvider
- - Data Display: Avatar, Badge, Calendar, Card, Carousel, Collapsible, Descriptions, Empty, Image, List, Listy, Masonry, Popover, QRCode, ScrollArea, Statistic, Table, Tag, Timeline, Tooltip, Tree
+ - Data Display: Avatar, Badge, Calendar, Card, Carousel, Collapse, Descriptions, Empty, Image, List, Listy, Masonry, Popover, QRCode, ScrollArea, Statistic, Table, Tag, Timeline, Tooltip, Tree
- Data Entry: AutoComplete, Cascader, Checkbox, ColorPicker, DatePicker, Form, FormActions, FormField, FormSection, Input, InputNumber, Mentions, Radio, RangePicker, Rate, Segmented, Select, Slider, Switch, Textarea, TimePicker, Transfer, TreeSelect, Upload
- Feedback: Alert, Drawer, Modal, Popconfirm, Progress, Result, Skeleton, Sonner, Spinner, Tour
- General: BorderBeam, Button, FloatButton, Watermark
- Headless: HeadlessInputNumber
- Layout: Divider, FormLayout, Splitter, Stack
- Navigation: Affix, Breadcrumb, ContextMenu, Dropdown, Pagination, Steps, Tabs
## Components
### Affix
Affixes content to a window or scroll container boundary.
- Category: Navigation
- Exports: `Affix`
- Source: `src/components/affix/affix.tsx`
- Storybook: `stories/affix.stories.tsx`
- Tests: `tests/affix/affix.test.tsx`
- Semantic parts: `root`, `content`
Affixes content to a window or scroll container boundary.
### Alert
Displays important contextual feedback messages with semantic status types.
- Category: Feedback
- Exports: `Alert`
- Source: `src/components/alert/alert.tsx`
- Storybook: `stories/alert.stories.tsx`
- Tests: `tests/alert/alert.test.tsx`
- Semantic parts: `root`, `icon`, `title`, `description`, `action`, `close`
Use Alert for persistent, page-level feedback about a state or operation. Use Sonner toasts for transient notifications.
### App
Scopes imperative messages, notifications and confirmation dialogs to the current React tree and TaoProvider theme.
- Category: Config
- Exports: `App`
- Source: `src/components/app/app.tsx`
- Storybook: `stories/app.stories.tsx`
- Tests: `tests/app/app.test.tsx`
- Semantic parts: `root`
Place App below TaoProvider, then call App.useApp() from descendant components. Messages return callable close handles that can be awaited; confirmation dialogs return update, destroy and then.
### AutoComplete
Editable text input with searchable suggestions, keyboard completion and custom input support.
- Category: Data Entry
- Exports: `AutoComplete`
- Source: `src/components/auto-complete/auto-complete.tsx`
- Storybook: `stories/auto-complete.stories.tsx`
- Tests: `tests/auto-complete/auto-complete.test.tsx`
- Semantic parts: `root`, `prefix`, `input`, `placeholder`, `content`, `clear`, `popup.root`, `popup.list`, `popup.listItem`
Use AutoComplete when free-form input is valid and suggestions help users finish typing.
### Avatar
Represents people with images, icons or automatically fitted initials.
- Category: Data Display
- Exports: `Avatar`
- Source: `src/components/avatar/avatar.tsx`
- Storybook: `stories/avatar.stories.tsx`
- Tests: `tests/avatar/avatar.test.tsx`
- Semantic parts: `root`, `image`, `icon`, `content`
Use Avatar for a person or account; group related people with Avatar.Group.
### Badge
Adds notification counts, status indicators or a ribbon to content.
- Category: Data Display
- Exports: `Badge`
- Source: `src/components/badge/badge.tsx`
- Storybook: `stories/badge.stories.tsx`
- Tests: `tests/badge/badge.test.tsx`
- Semantic parts: `root`, `indicator`
Use Badge for compact counts or a status next to a label.
### BorderBeam
Animates a highlighted beam around the border of its child.
- Category: General
- Exports: `BorderBeam`
- Source: `src/components/border-beam/border-beam.tsx`
- Storybook: `stories/border-beam.stories.tsx`
- Tests: `tests/border-beam/border-beam.test.tsx`
- Semantic parts: `root`, `beam`
Animates a highlighted beam around the border of its child.
### Breadcrumb
Renders the user location in a hierarchy of pages or views.
- Category: Navigation
- Exports: `Breadcrumb`
- Source: `src/components/breadcrumb/breadcrumb.tsx`
- Storybook: `stories/breadcrumb.stories.tsx`
- Tests: `tests/breadcrumb/breadcrumb.test.tsx`
- Semantic parts: `root`, `list`, `item`, `link`, `page`, `separator`, `ellipsis`
Use Breadcrumb near the top of a page when users need to understand or move through nested context.
### Button
Triggers an immediate action such as submitting, saving, or opening a surface.
- Category: General
- Exports: `Button`
- Source: `src/components/button/button.tsx`
- Storybook: `stories/button.stories.tsx`
- Tests: `tests/button/button.test.tsx`
- Semantic parts: `root`
Use Button for explicit actions. It inherits size, disabled, and variant defaults from TaoProvider.
### Calendar
Browse a month or year and place events inside date cells.
- Category: Data Display
- Exports: `Calendar`
- Source: `src/components/calendar/calendar.tsx`
- Storybook: `stories/calendar.stories.tsx`
- Tests: `tests/calendar/calendar.test.tsx`
- Semantic parts: `root`, `header`, `body`, `content`, `item`, `itemContent`
Use Calendar to browse schedules and select a day without opening a popup.
### Card
Groups related content with an optional heading, cover, tabs and actions.
- Category: Data Display
- Exports: `Card`
- Source: `src/components/card/card.tsx`
- Storybook: `stories/card.stories.tsx`
- Tests: `tests/card/card.test.tsx`
- Semantic parts: `root`, `header`, `body`, `extra`, `title`, `actions`, `cover`
Use Card for a distinct content item; Card.Meta organizes its identity and description.
### Carousel
Swipeable slides with fade, directional dots, autoplay, arrows and imperative navigation.
- Category: Data Display
- Exports: `Carousel`
- Source: `src/components/carousel/carousel.tsx`
- Storybook: `stories/carousel.stories.tsx`
- Tests: `tests/carousel/carousel.test.tsx`
- Semantic parts: `root`, `dots`
Swipeable slides with fade, directional dots, autoplay, arrows and imperative navigation.
### Cascader
Choose paths through hierarchical options with search, lazy loading, multiple selection and an inline panel.
- Category: Data Entry
- Exports: `Cascader`, `CascaderPanel`
- Source: `src/components/cascader/cascader.tsx`
- Storybook: `stories/cascader.stories.tsx`
- Tests: `tests/cascader/cascader.test.tsx`
- Semantic parts: `root`, `prefix`, `suffix`, `input`, `clear`, `placeholder`, `content`, `item`, `itemContent`, `itemRemove`, `popup.root`, `popup.list`, `popup.listItem`
Use Cascader when users select a complete path such as region, department or category.
### Checkbox
Selects one or more independent boolean options.
- Category: Data Entry
- Exports: `Checkbox`, `CheckboxGroup`
- Source: `src/components/checkbox/checkbox.tsx`
- Storybook: `stories/checkbox.stories.tsx`
- Tests: `tests/checkbox/checkbox.test.tsx`
- Semantic parts: `root`, `indicator`, `label`
Use Checkbox for independent choices, or CheckboxGroup when users can select multiple options from a set.
- ### Collapsible
+ ### Collapse
- Shows and hides a region of content while keeping disclosure state accessible.
+ Groups content into accessible item-based panels with built-in headers, expand icons and accordion behavior.
- Category: Data Display
- - Exports: `Collapsible`
- - Source: `src/components/collapsible/collapsible.tsx`
- - Storybook: `stories/collapsible.stories.tsx`
- - Tests: `tests/collapsible/collapsible.test.tsx`
- - Semantic parts: `root`, `trigger`, `content`
+ - Exports: `Collapse`
+ - Source: `src/components/collapse/collapse.tsx`
+ - Storybook: `stories/collapse.stories.tsx`
+ - Tests: `tests/collapse/collapse.test.tsx`, `tests/collapse/panels.test.tsx`
+ - Semantic parts: `root`, `item`, `header`, `trigger`, `title`, `icon`, `extra`, `content`, `body`
- Use Collapsible to hide secondary details while preserving a lightweight page layout.
+ Pass items with key, label and children for ready-to-use panels; use accordion to allow one open panel and activeKey/onChange for controlled state.
### ColorPicker
Choose single or gradient colors with hex, RGB, HSB and alpha controls.
- Category: Data Entry
- Exports: `ColorPicker`
- Source: `src/components/color-picker/color-picker.tsx`
- Storybook: `stories/color-picker.stories.tsx`
- Tests: `tests/color-picker/color-picker.test.tsx`
- Semantic parts: `root`, `body`, `content`, `description`, `popup.root`, `popup.container`
Keep the returned Color object when precision matters and call toCssString for use in CSS.
### ContextMenu
Displays contextual actions from a right click or long press interaction.
- Category: Navigation
- Exports: `ContextMenu`
- Source: `src/components/context-menu/context-menu.tsx`
- Storybook: `stories/context-menu.stories.tsx`
- Tests: `tests/context-menu/context-menu.test.tsx`
- Semantic parts: `root`, `content`, `item`, `itemIcon`, `itemLabel`, `itemExtra`, `divider`, `groupLabel`, `subTrigger`, `subContent`
Use ContextMenu for secondary actions attached to an object or region.
### DatePicker
Lets users enter or choose a single date, with optional time selection.
- Category: Data Entry
- Exports: `DatePicker`
- Source: `src/components/date-picker/date-picker.tsx`
- Storybook: `stories/date-picker.stories.tsx`
- Tests: `tests/date-picker/date-picker.test.tsx`, `tests/date-picker/use-calendar.test.ts`
- Semantic parts: `root`, `input`, `popup`, `calendar`, `cell`, `footer`
Use DatePicker when free text date input would be error-prone or when users benefit from calendar context.
### Descriptions
Displays labeled record fields with responsive columns and flexible spans.
- Category: Data Display
- Exports: `Descriptions`
- Source: `src/components/descriptions/descriptions.tsx`
- Storybook: `stories/descriptions.stories.tsx`
- Tests: `tests/descriptions/descriptions.test.tsx`
- Semantic parts: `root`, `header`, `title`, `extra`, `label`, `content`
Use Descriptions for read-only details; use Form for editable fields.
### Divider
Separates sections or inline actions with an optional title.
- Category: Layout
- Exports: `Divider`
- Source: `src/components/divider/divider.tsx`
- Storybook: `stories/divider.stories.tsx`
- Tests: `tests/divider/divider.test.tsx`
- Semantic parts: `root`, `rail`, `content`
Use a divider when spacing alone cannot explain a section boundary.
### Drawer
Opens a side panel for related tasks without leaving the current page.
- Category: Feedback
- Exports: `Drawer`
- Source: `src/components/drawer/drawer.tsx`
- Storybook: `stories/drawer.stories.tsx`
- Tests: `tests/drawer/drawer.test.tsx`
- Semantic parts: `root`, `overlay`, `header`, `title`, `extra`, `body`, `footer`, `close`, `dragger`
Use Drawer for inspection, editing, or supporting workflows that should stay connected to the current page.
### Dropdown
Opens a menu of actions or navigation choices from a trigger.
- Category: Navigation
- Exports: `Dropdown`
- Source: `src/components/dropdown/dropdown.tsx`
- Storybook: `stories/dropdown.stories.tsx`
- Tests: `tests/dropdown/dropdown.test.tsx`
- Semantic parts: `root`, `content`, `item`, `itemIcon`, `itemLabel`, `itemExtra`, `divider`, `groupLabel`, `subTrigger`, `subContent`
Use Dropdown for compact action sets that do not need to stay visible.
### Empty
Shows a localized empty state with an illustration, description and optional action.
- Category: Data Display
- Exports: `Empty`
- Source: `src/components/empty/empty.tsx`
- Storybook: `stories/empty.stories.tsx`
- Tests: `tests/empty/empty.test.tsx`
- Semantic parts: `root`, `image`, `description`, `footer`
Shows a localized empty state with an illustration, description and optional action.
### FloatButton
Provides floating actions, grouped controls and a scroll-to-top action.
- Category: General
- Exports: `FloatButton`
- Source: `src/components/float-button/float-button.tsx`
- Storybook: `stories/float-button.stories.tsx`
- Tests: `tests/float-button/float-button.test.tsx`
- Semantic parts: `root`, `icon`, `content`
Provides floating actions, grouped controls and a scroll-to-top action.
### Form
Collects and validates field values with an antd-aligned API (rules, dependencies, Form.List) on top of the rc-form engine.
- Category: Data Entry
- Exports: `Form`
- Source: `src/components/form/form.tsx`
- Storybook: `stories/form.stories.tsx`
- Tests: `tests/form/form.test.tsx`
- Semantic parts: `root`
Use Form with Form.Item when fields need a value store, rule validation, or submit handling. Use the lighter FormField when you manage state yourself.
### FormActions
Lays out submit, cancel, and secondary actions for forms.
- Category: Data Entry
- Exports: `FormActions`
- Source: `src/components/form-actions/form-actions.tsx`
- Storybook: `stories/form.stories.tsx`
- Tests: `tests/form-actions/form-actions.test.tsx`
- Semantic parts: `root`
Use FormActions at the end of a form or section to align the final actions consistently.
### FormField
Associates labels, help text, validation state, and controls.
- Category: Data Entry
- Exports: `FormField`
- Source: `src/components/form-field/form-field.tsx`
- Storybook: `stories/form.stories.tsx`
- Tests: `tests/form-field/form-field.test.tsx`
- Semantic parts: `root`, `label`, `description`, `error`
Use FormField to provide accessible labeling and status text around a single control.
### FormLayout
Arranges form content with consistent label and control alignment.
- Category: Layout
- Exports: `FormLayout`
- Source: `src/layouts/form-layout/form-layout.tsx`
- Storybook: `stories/form-layout.stories.tsx`
- Tests: `tests/layouts/form-layout/form-layout.test.tsx`
- Semantic parts: `root`
Use FormLayout to keep dense forms aligned and predictable.
### FormSection
Groups related form fields with a title and optional description.
- Category: Data Entry
- Exports: `FormSection`
- Source: `src/components/form-section/form-section.tsx`
- Storybook: `stories/form.stories.tsx`
- Tests: `tests/form-section/form-section.test.tsx`
- Semantic parts: `root`, `header`, `title`, `description`, `body`
Use FormSection to break long forms into scannable groups.
### HeadlessInputNumber
Headless numeric input primitives and hook for custom number entry experiences.
- Category: Headless
- Exports: `HeadlessInputNumber`, `NumberInput`, `useNumberInput`
- Source: `src/number-input/number-input.tsx`
- Storybook: `stories/headless-input-number.stories.tsx`
- Tests: `tests/number-input/headless-input-number.test.tsx`, `tests/number-input/use-number-input.test.tsx`, `tests/number-input/format.test.ts`, `tests/number-input/validate.test.ts`
Use the headless API when tao-ui styling is not appropriate but number formatting behavior should stay consistent.
### Image
Images with keyboard-accessible preview, grouping, transforms, fallbacks and upload progress.
- Category: Data Display
- Exports: `Image`, `ImagePreviewGroup`
- Source: `src/components/image/image.tsx`
- Storybook: `stories/image.stories.tsx`
- Tests: `tests/image/image.test.tsx`
- Semantic parts: `root`, `image`, `cover`, `popup.root`, `popup.mask`, `popup.body`, `popup.footer`, `popup.actions`, `popup.close`, `placeholder.progress.root`, `placeholder.progress.content`, `placeholder.progress.rail`, `placeholder.progress.indicator`
Images with keyboard-accessible preview, grouping, transforms, fallbacks and upload progress.
### Input
- Single-line text input for short freeform values.
+ Text inputs with clearing, counting, password visibility, search, text areas and OTP.
- Category: Data Entry
- Exports: `Input`
- Source: `src/components/input/input.tsx`
- Storybook: `stories/input.stories.tsx`
- - Tests: `tests/input/input.test.tsx`
- - Semantic parts: `root`, `input`, `prefix`, `suffix`
+ - Tests: `tests/input/input.test.tsx`, `tests/input/family.test.tsx`
+ - Semantic parts: `root`, `input`, `prefix`, `suffix`, `clear`, `count`, `addonBefore`, `addonAfter`
Use Input for short text values such as names, filters, search terms, and identifiers.
### InputNumber
A styled numeric input built on tao-ui number formatting and validation behavior.
- Category: Data Entry
- Exports: `InputNumber`
- Source: `src/components/input-number/input-number.tsx`
- Storybook: `stories/input-number.stories.tsx`
- Tests: `tests/input-number/input-number.test.tsx`
- Semantic parts: `root`, `input`, `prefix`, `suffix`
Use InputNumber for numeric values that need min, max, step, precision, or formatted display.
### List
Displays records with metadata, actions, loading, pagination and responsive columns.
- Category: Data Display
- Exports: `List`
- Source: `src/components/list/list.tsx`
- Storybook: `stories/list.stories.tsx`
- Tests: `tests/list/list.test.tsx`
- Semantic parts: `root`, `header`, `items`, `footer`, `pagination`, `empty`
Compose repeated content with List.Item and List.Item.Meta.
### Listy
Renders grouped or virtualized lists with precise item, group and position scrolling.
- Category: Data Display
- Exports: `Listy`
- Source: `src/components/listy/listy.tsx`
- Storybook: `stories/listy.stories.tsx`
- Tests: `tests/listy/listy.test.tsx`
- Semantic parts: `root`, `item`, `groupHeader`
Render long lists and grouped records without mounting the entire data set.
### Masonry
Arranges variable-height content in responsive balanced columns.
- Category: Data Display
- Exports: `Masonry`
- Source: `src/components/masonry/masonry.tsx`
- Storybook: `stories/masonry.stories.tsx`
- Tests: `tests/masonry/masonry.test.tsx`
- Semantic parts: `root`, `item`
Arranges variable-height content in responsive balanced columns.
### Mentions
Insert mentions into multiline text using configurable prefixes, search suggestions and keyboard selection.
- Category: Data Entry
- Exports: `Mentions`
- Source: `src/components/mentions/mentions.tsx`
- Storybook: `stories/mentions.stories.tsx`
- Tests: `tests/mentions/mentions.test.tsx`
- Semantic parts: `root`, `textarea`, `popup`, `suffix`
Use Mentions for comments and messages that refer to people, topics or identifiers.
### Modal
Displays a focused dialog for decisions, forms, and interruptive information.
- Category: Feedback
- Exports: `Modal`
- Source: `src/components/modal/modal.tsx`
- Storybook: `stories/modal.stories.tsx`
- Tests: `tests/modal/modal.test.tsx`
- Semantic parts: `root`, `container`, `wrapper`, `mask`, `overlay`, `header`, `title`, `body`, `footer`, `close`
Use Modal for focused tasks or decisions. Static helpers such as Modal.confirm mirror common confirmation flows.
### Pagination
Moves through paged data with current page and page-size controls.
- Category: Navigation
- Exports: `Pagination`
- Source: `src/components/pagination/pagination.tsx`
- Storybook: `stories/pagination.stories.tsx`
- Tests: `tests/pagination/pagination.test.tsx`
- Semantic parts: `root`, `item`, `total`
Use Pagination when a collection is split into pages rather than infinitely loaded.
### Popconfirm
Shows a compact confirmation popup anchored to a trigger element, with OK and Cancel actions.
- Category: Feedback
- Exports: `Popconfirm`
- Source: `src/components/popconfirm/popconfirm.tsx`
- Storybook: `stories/popconfirm.stories.tsx`
- Tests: `tests/popconfirm/popconfirm.test.tsx`
- Semantic parts: `content`, `title`, `description`, `footer`, `icon`
Use Popconfirm for lightweight inline confirmations such as delete actions, where a full Modal would be too heavy. Use Modal.confirm for critical or complex confirmations.
### Popover
Displays a floating card with rich content anchored to a trigger element, opened by click or hover.
- Category: Data Display
- Exports: `Popover`
- Source: `src/components/popover/popover.tsx`
- Storybook: `stories/popover.stories.tsx`
- Tests: `tests/popover/popover.test.tsx`
- Semantic parts: `root`, `container`, `title`, `content`, `arrow`
Use Popover for rich, non-blocking contextual content behind a click or hover. Use Tooltip for short text-only hints and Modal for blocking interactions.
### Progress
Shows measured completion with line, circle, dashboard or stepped progress indicators.
- Category: Feedback
- Exports: `Progress`
- Source: `src/components/progress/progress.tsx`
- Storybook: `stories/progress.stories.tsx`
- Tests: `tests/progress/progress.test.tsx`
- Semantic parts: `root`, `body`, `rail`, `track`, `indicator`
Shows measured completion with line, circle, dashboard or stepped progress indicators.
### QRCode
Encode a value as a canvas or SVG QR code with status and refresh controls.
- Category: Data Display
- Exports: `QRCode`
- Source: `src/components/qr-code/qr-code.tsx`
- Storybook: `stories/qr-code.stories.tsx`
- Tests: `tests/qr-code/qr-code.test.tsx`
- Semantic parts: `root`, `cover`
Provide a stable value and choose canvas for bitmap download or SVG for resolution-independent output.
### Radio
Selects exactly one option from a mutually exclusive set.
- Category: Data Entry
- Exports: `Radio`, `RadioGroup`
- Source: `src/components/radio/radio.tsx`
- Storybook: `stories/radio.stories.tsx`
- Tests: `tests/radio/radio.test.tsx`
- Semantic parts: `root`, `indicator`, `label`
Use RadioGroup when every option is visible and only one can be selected.
### RangePicker
Lets users select a start and end date as one range value.
- Category: Data Entry
- Exports: `RangePicker`
- Source: `src/components/date-picker/range-picker.tsx`
- Storybook: `stories/date-picker.stories.tsx`
- Tests: `tests/date-picker/range-picker.test.tsx`, `tests/date-picker/use-calendar.test.ts`
- Semantic parts: `root`, `input`, `separator`, `popup`, `calendar`, `cell`
Use RangePicker for reporting windows, booking windows, and filters with start/end dates.
### Rate
Collects or displays a rating with half steps, keyboard control and custom symbols.
- Category: Data Entry
- Exports: `Rate`
- Source: `src/components/rate/rate.tsx`
- Storybook: `stories/rate.stories.tsx`
- Tests: `tests/rate/rate.test.tsx`
- Semantic parts: `root`, `item`
Collect or show a bounded rating.
### Result
Communicates an operation result or error page with status, explanation and next actions.
- Category: Feedback
- Exports: `Result`
- Source: `src/components/result/result.tsx`
- Storybook: `stories/result.stories.tsx`
- Tests: `tests/result/result.test.tsx`
- Semantic parts: `root`, `title`, `subTitle`, `body`, `extra`, `icon`
Communicates an operation result or error page with status, explanation and next actions.
### ScrollArea
Provides a styled scroll container for overflow content.
- Category: Data Display
- Exports: `ScrollArea`
- Source: `src/components/scroll-area/scroll-area.tsx`
- Storybook: `stories/scroll-area.stories.tsx`
- Tests: `tests/scroll-area/scroll-area.test.tsx`
- Semantic parts: `root`, `viewport`, `scrollbar`, `thumb`
Use ScrollArea when a fixed region needs overflow behavior without changing page scroll.
### Segmented
Selects one option from a compact accessible radio group.
- Category: Data Entry
- Exports: `Segmented`
- Source: `src/components/segmented/segmented.tsx`
- Storybook: `stories/segmented.stories.tsx`
- Tests: `tests/segmented/segmented.test.tsx`
- Semantic parts: `root`, `item`, `label`, `icon`
Use Segmented for a small set of related views or modes.
### Select
Chooses one value from a compact list of options.
- Category: Data Entry
- Exports: `Select`
- Source: `src/components/select/select.tsx`
- Storybook: `stories/select.stories.tsx`
- Tests: `tests/select/select.test.tsx`
- Semantic parts: `root`, `prefix`, `suffix`, `placeholder`, `clear`, `popup`, `search`, `searchInput`, `group`, `groupLabel`, `item`, `itemIcon`, `itemLabel`, `itemDesc`, `empty`, `tag`, `tagLabel`, `tagClose`, `tagRest`, `values`
Use Select when choices are known but too numerous or secondary to show as radios.
### Skeleton
Displays theme-aware loading placeholders for content, avatars, controls and images.
- Category: Feedback
- Exports: `Skeleton`
- Source: `src/components/skeleton/skeleton.tsx`
- Storybook: `stories/skeleton.stories.tsx`
- Tests: `tests/skeleton/skeleton.test.tsx`
- Semantic parts: `root`, `header`, `section`, `avatar`, `title`, `paragraph`
Displays theme-aware loading placeholders for content, avatars, controls and images.
### Slider
Selects a numeric value or editable range using pointer, touch and keyboard input.
- Category: Data Entry
- Exports: `Slider`
- Source: `src/components/slider/slider.tsx`
- Storybook: `stories/slider.stories.tsx`
- Tests: `tests/slider/slider.test.tsx`
- Semantic parts: `root`, `rail`, `tracks`, `track`, `handle`
Adjust numeric values within explicit bounds.
### Sonner
Displays temporary toast notifications with optional actions and provider-aware theming.
- Category: Feedback
- Exports: `Sonner`, `toast`
- Source: `src/components/sonner/sonner.tsx`
- Storybook: `stories/sonner.stories.tsx`
- Tests: `tests/sonner/sonner.test.tsx`
- Semantic parts: `viewport`, `toast`, `content`, `title`, `description`, `actions`, `action`, `cancel`, `close`
Mount one Sonner near app root, then call toast() imperatively from event handlers. Supports toast.loading(), toast.promise(), and toast.custom() for richer async and custom notification flows.
### Spinner
Indicates indeterminate loading activity.
- Category: Feedback
- Exports: `Spinner`
- Source: `src/components/spinner/spinner.tsx`
- Storybook: `stories/spinner.stories.tsx`
- Tests: `tests/spinner/spinner.test.tsx`
- Semantic parts: `root`, `indicator`, `tip`, `overlay`
Use Spinner for short indeterminate waits when progress cannot be measured.
### Splitter
Creates resizable panes separated by draggable handles.
- Category: Layout
- Exports: `Splitter`
- Source: `src/components/splitter/splitter.tsx`
- Storybook: `stories/splitter.stories.tsx`
- Tests: `tests/splitter/splitter.test.tsx`
- Semantic parts: `root`, `panel`, `dragger`
Use Splitter for work surfaces where users need to allocate space between adjacent panes.
### Stack
Composes children in a flex row or column with consistent spacing.
- Category: Layout
- Exports: `Stack`
- Source: `src/layouts/stack/stack.tsx`
- Storybook: `stories/stack.stories.tsx`
- Tests: `tests/layouts/stack/stack.test.tsx`
- Semantic parts: `root`
Use Stack for simple one-dimensional layout and spacing.
### Statistic
Formats metrics and live count-up or countdown timers.
- Category: Data Display
- Exports: `Statistic`
- Source: `src/components/statistic/statistic.tsx`
- Storybook: `stories/statistic.stories.tsx`
- Tests: `tests/statistic/statistic.test.tsx`
- Semantic parts: `root`, `header`, `title`, `content`, `value`, `prefix`, `suffix`
Use Statistic to emphasize a single metric with a clear title and unit.
### Steps
Guides users through the ordered stages of a task.
- Category: Navigation
- Exports: `Steps`
- Source: `src/components/steps/steps.tsx`
- Storybook: `stories/steps.stories.tsx`
- Tests: `tests/steps/steps.test.tsx`
- Semantic parts: `root`, `item`, `itemWrapper`, `itemIcon`, `itemSection`, `itemHeader`, `itemTitle`, `itemSubtitle`, `itemContent`, `itemRail`
Use Steps to show progress through a multi-stage task, or to let users jump back to a stage they already visited.
### Switch
Toggles a setting on or off with immediate effect.
- Category: Data Entry
- Exports: `Switch`
- Source: `src/components/switch/switch.tsx`
- Storybook: `stories/switch.stories.tsx`
- Tests: `tests/switch/switch.test.tsx`
- Semantic parts: `root`, `handle`
Use Switch for settings that take effect immediately.
### Table
Displays structured row and column data with selection, sorting, filtering, expandable rows, summary rows, a pinned header, and pagination hooks.
- Category: Data Display
- Exports: `Table`
- Source: `src/components/table/table.tsx`
- Storybook: `stories/table.stories.tsx`
- Tests: `tests/table/table.test.tsx`
- Semantic parts: `root`, `scroll`, `table`, `header.wrapper`, `header.row`, `header.cell`, `header.content`, `header.title`, `body.row`, `body.cell`, `selection.cell`, `expandedRow`, `summary`, `empty`, `pagination`
Use Table for dense, comparable records that benefit from aligned columns.
### Tabs
Switches between peer panels within the same page context.
- Category: Navigation
- Exports: `Tabs`
- Source: `src/components/tabs/tabs.tsx`
- Storybook: `stories/tabs.stories.tsx`
- Tests: `tests/tabs/tabs.test.tsx`
- Semantic parts: `root`, `nav`, `tab`, `indicator`, `panel`
Use Tabs to separate peer views without navigating away from the current task.
### Tag
Displays compact labels, statuses, categories, or checkable chips.
- Category: Data Display
- Exports: `Tag`, `CheckableTag`
- Source: `src/components/tag/tag.tsx`
- Storybook: `stories/tag.stories.tsx`
- Tests: `tests/tag/tag.test.tsx`
- Semantic parts: `root`, `icon`, `content`, `close`
Use Tag for lightweight metadata or status markers. Use CheckableTag for compact filter choices.
### TaoProvider
Provides global component defaults, portal scoping, and theme seed token overrides.
- Category: Config
- Exports: `TaoProvider`
- Source: `src/provider/tao-provider.tsx`
- Storybook: `stories/provider.stories.tsx`
- Tests: `tests/provider/tao-provider.test.tsx`
Wrap an app or subtree with TaoProvider to set size, disabled, variant, and theme defaults.
### Textarea
- Multi-line text input with optional auto sizing.
+ Multi-line text input with auto sizing, clearing and custom character counts; also available as Input.TextArea.
- Category: Data Entry
- Exports: `Textarea`
- Source: `src/components/textarea/textarea.tsx`
- Storybook: `stories/textarea.stories.tsx`
- Tests: `tests/textarea/textarea.test.tsx`
- - Semantic parts: `root`, `textarea`
+ - Semantic parts: `root`, `textarea`, `clear`, `count`
Use Textarea for longer freeform content such as descriptions, notes, and comments.
### Timeline
Shows ordered events with timestamps, indicators and alternate layouts.
- Category: Data Display
- Exports: `Timeline`
- Source: `src/components/timeline/timeline.tsx`
- Storybook: `stories/timeline.stories.tsx`
- Tests: `tests/timeline/timeline.test.tsx`
- Semantic parts: `root`, `item`, `itemWrapper`, `itemIcon`, `itemSection`, `itemHeader`, `itemTitle`, `itemContent`, `itemRail`
Use Timeline for chronological events and their current progress.
### TimePicker
Select or type a time, or a time range, with Day.js values and configurable precision.
- Category: Data Entry
- Exports: `TimePicker`, `TimeRangePicker`
- Source: `src/components/time-picker/time-picker.tsx`
- Storybook: `stories/time-picker.stories.tsx`
- Tests: `tests/time-picker/time-picker.test.tsx`
- Semantic parts: `root`, `prefix`, `input`, `suffix`, `popup`
Use TimePicker when a form needs a time without a calendar date; use TimePicker.RangePicker for start and end times.
### Tooltip
Shows a brief informational popup when hovering or focusing an element.
- Category: Data Display
- Exports: `Tooltip`
- Source: `src/components/tooltip/tooltip.tsx`
- Storybook: `stories/tooltip.stories.tsx`
- Tests: `tests/tooltip/tooltip.test.tsx`
- Semantic parts: `content`, `arrow`
Use Tooltip for short contextual hints on hover or focus. The popup is portaled and inherits the TaoProvider theme.
### Tour
Guided steps anchored to page elements with a spotlight mask, custom content and accessible actions.
- Category: Feedback
- Exports: `Tour`
- Source: `src/components/tour/tour.tsx`
- Storybook: `stories/tour.stories.tsx`
- Tests: `tests/tour/tour.test.tsx`
- Semantic parts: `root`, `cover`, `close`, `mask`, `section`, `footer`, `actions`, `indicator`, `indicators`, `header`, `title`, `description`
Guided steps anchored to page elements with a spotlight mask, custom content and accessible actions.
### Transfer
Moves selected records between searchable, paginated source and target lists.
- Category: Data Entry
- Exports: `Transfer`
- Source: `src/components/transfer/transfer.tsx`
- Storybook: `stories/transfer.stories.tsx`
- Tests: `tests/transfer/transfer.test.tsx`
- Semantic parts: `root`, `section`, `header`, `title`, `body`, `list`, `item`, `itemIcon`, `itemContent`, `footer`, `actions`
Assign records by moving them between source and target lists.
### Tree
Navigate, select and check hierarchical data with keyboard navigation, lazy loading and virtual scrolling.
- Category: Data Display
- Exports: `Tree`, `DirectoryTree`
- Source: `src/components/tree/tree.tsx`
- Storybook: `stories/tree.stories.tsx`
- Tests: `tests/tree/tree.test.tsx`
- Semantic parts: `root`, `item`, `itemIcon`, `itemTitle`, `itemSwitcher`
Use Tree for hierarchical information. DirectoryTree adds file-explorer selection with Ctrl/Command and Shift modifiers.
### TreeSelect
Select hierarchical values with search, checkable trees, lazy loading and virtual scrolling.
- Category: Data Entry
- Exports: `TreeSelect`
- Source: `src/components/tree-select/tree-select.tsx`
- Storybook: `stories/tree-select.stories.tsx`
- Tests: `tests/tree-select/tree-select.test.tsx`
- Semantic parts: `root`, `prefix`, `suffix`, `input`, `clear`, `placeholder`, `content`, `item`, `itemContent`, `itemRemove`, `popup.root`, `popup.item`, `popup.itemTitle`, `popup.itemSwitcher`
Use TreeSelect when a form value comes from a hierarchy and users need to search or check multiple nodes.
### Upload
Select, transform, upload and manage files with real request progress and cancellation.
- Category: Data Entry
- Exports: `Upload`
- Source: `src/components/upload/upload.tsx`
- Storybook: `stories/upload.stories.tsx`
- Tests: `tests/upload/upload.test.tsx`
- Semantic parts: `root`, `list`, `item`, `trigger`
Provide an upload action or a customRequest transport, or return false from beforeUpload to manage files locally.
### Watermark
Repeats a text or image watermark over content and inherited dialog panels.
- Category: General
- Exports: `Watermark`
- Source: `src/components/watermark/watermark.tsx`
- Storybook: `stories/watermark.stories.tsx`
- Tests: `tests/watermark/watermark.test.tsx`
- Semantic parts: `root`, `mark`
Repeats a text or image watermark over content and inherited dialog panels.
## Notes For Code Generation
- - Prefer root imports from `@rockshin/tao-ui`.
+ - Prefer component subpaths for smaller imports; the root entry remains supported.
- Customize internals through semantic `classNames` and `styles`, not private class names.
- Prefer provider-level defaults for app-wide size, disabled, variant, and theme choices.
- Use `Modal.useModal()` inside React components so dialogs inherit the surrounding provider context.