@treeui/vue
| Install | |
|---|---|
npm install @treeui/vue |
|
| Latest Version: | 0.34.1 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Oct 22, 2026 |
| Links: | GitHub · npm |
@treeui/vue
Vue 3 component library with 100+ accessible, themeable components built on design tokens.
Install
pnpm add @treeui/vue
# or
npm install @treeui/vue
Install @treeui/tokens only when you need direct access to the token package or want to use the theme CSS outside the Vue component layer.
Setup
import { createApp } from 'vue'
import { TreeUIPlugin } from '@treeui/vue'
import '@treeui/vue/style.css'
const app = createApp(App)
app.use(TreeUIPlugin)
app.mount('#app')
If your app uses toasts, mount TToastProvider once near the root before calling useToast().
Or import components individually:
import { TButton, TInput, TModal } from '@treeui/vue'
import '@treeui/vue/style.css'
Consumer checklist
- Install
@treeui/vue - Import
@treeui/vue/style.cssonce - Use
app.use(TreeUIPlugin)or named imports - Mount
TToastProvideronce near the app root if you useuseToast() - Use
TFormFieldas the wrapper for labels, hints, and errors
Components
100+ components across a handful of families, all sharing the same design
tokens, the sm | md | lg size scale, and the same action variants:
- Forms & data entry — text and selection inputs, date and time pickers, file upload, a markdown editor.
- Layout & app shell — containers, grids, stacks, sidebar and navigation shell, accordions, cards, tabs.
- Data display & data-viz — badges, tags, avatars, timelines, stats, and a lightweight, dependency-free chart set.
- Overlays — modals, drawers, dropdowns, popovers, tooltips, context menus, toasts.
- Navigation — breadcrumbs, pagination, steps, tree views, selectable lists.
- Feedback — alerts, progress, spinners, skeletons, empty states.
A hand-kept name-by-name list here would drift from what the package actually
ships — the generated Foundation/Components index in the published Vue
Storybook is built from the same
catalog the library exports, so it cannot fall behind. For tooling and coding
agents, docs/ai/CONTRACTS.yaml → primary_exports is the machine-readable
list.
Table composition
TTable stays focused on structured listing. Filters, toolbars, bulk actions, and pagination are intended to be composed around it, with TPagination used separately when needed.
Use #cell-<key> and #header-<key> slots when a column needs derived content or custom markup.
Theming
TreeUI uses CSS custom properties (--tree-*) for all styling. Light theme is applied by default.
Dark mode
Dark mode activates automatically via prefers-color-scheme: dark. To control it explicitly:
<!-- Force dark -->
<html data-tree-theme="dark">
<!-- Force light -->
<html data-tree-theme="light">
Programmatic control
// Toggle theme
document.documentElement.setAttribute('data-tree-theme', 'dark')
Conventions
- All public exports use the
Tprefix. TNavbar/TAppBarandTSteps/TStepperare alias pairs for the same implementations.- Page-level assemblies that are mostly layout stay documented as recipes until they need a dedicated semantic API.
- Overlays such as
TModal,TDrawer, andTPopoversupport controlled open state;TModalworks withv-model:open. TSelectacceptsstringornumbervalues.TBreadcrumbItemacceptshreffor anchors andtofor vue-router projects.TBadgekeeps visual variants and can add semantic meaning withtone.TStatincludes aloadingstate for built-in placeholders.
Semantic aliases in docs
Some docs use familiar product terms as aliases for existing TreeUI patterns. These are documentation aliases only, not extra exports.
Snackbar/Notification->TToastBanner->TAlertCollapsible/Details->TAccordionwithtype="single"andcollapsibleApp bar->TNavbar/TAppBarStepper->TSteps/TStepper
Docs-first patterns
Some repeated app UI intentionally stays documented as composition guidance instead of becoming extra exports:
- Stat groups:
TGrid+TStat - Section headers: heading +
TStack+ optionalTBadgeorTButton - Subpanels:
TCard, especiallyvariant="soft" - Stacked cards:
TCardslots +TTag/TBadge/ actions - Eyebrow text: typography recipe using existing tokens
- Form stacks:
TStack+TGrid+TFormField - Rankings:
TTableorTSelectableList - Action panels:
TAlert+TCard+TButton - Color fields:
TFormField+ nativeinput[type="color"] - Tag inputs:
TFormField+TInput+ removableTTag - Router-backed tabs:
TTabs+ app route state - Charts:
TChart/TSparkline/TDonutChart(native, no chart library) — frame them inTCard+TStackwhen a titled surface is wanted
TypeScript
Full TypeScript support with exported types:
import type { TSize, TVariant } from '@treeui/vue'
Documentation
See the full component docs and interactive playground at the Vue Storybook.
License
MIT
Related Packages
The design system behind Hikarinagi: Vue 3 components built on Tailwind CSS v4.
UI components with shared design tokens and accessible interactions for Vue, Rea...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.34.1 | ^3.5.13 | MIT | |
| 0.34.0 | ^3.5.13 | MIT | |
| 0.33.0 | ^3.5.13 | MIT | |
| 0.32.0 | ^3.5.13 | MIT | |
| 0.31.0 | ^3.5.13 | MIT | |
| 0.30.0 | ^3.5.13 | MIT | |
| 0.29.0 | ^3.5.13 | MIT | |
| 0.28.0 | ^3.5.13 | MIT | |
| 0.27.0 | ^3.5.13 | MIT | |
| 0.26.0 | ^3.5.13 | MIT | |
| 0.25.0 | ^3.5.13 | MIT | |
| 0.24.0 | ^3.5.13 | ||
| 0.23.0 | ^3.5.13 | ||
| 0.22.1 | ^3.5.13 | ||
| 0.22.0 | ^3.5.13 | ||
| 0.21.0 | ^3.5.13 | ||
| 0.20.0 | ^3.5.13 | ||
| 0.19.1 | ^3.5.13 | ||
| 0.19.0 | ^3.5.13 | ||
| 0.18.0 | ^3.5.13 | ||
| 0.17.0 | ^3.5.13 | ||
| 0.16.0 | ^3.5.13 | ||
| 0.15.0 | ^3.5.13 | ||
| 0.14.0 | ^3.5.13 | ||
| 0.13.0 | ^3.5.13 | ||
| 0.12.0 | ^3.5.13 | ||
| 0.11.0 | ^3.5.13 | ||
| 0.10.0 | ^3.5.13 | ||
| 0.8.0 | ^3.5.13 | ||
| 0.7.0 | ^3.5.13 |
Showing the latest 30 of 41. See every release on npm