Component libraries for Vue
Styled kits, Tailwind-based kits, and headless primitives: how each kind of Vue component library plugs into an app, and how to judge one first.
Component libraries for Vue
The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.
Not started
What you'll learn
- A component library buys you the hard parts of UI, such as focus management, keyboard support, ARIA attributes, and positioning for menus and dialogs, which take far longer to get right than the visual styling.
- Vue libraries fall into three groups: full styled kits like Vuetify, PrimeVue, Quasar, Element Plus, and Naive UI; Tailwind-based kits like Nuxt UI; and headless primitives like Reka UI, with shadcn-vue copying styled components built on them into your own codebase.
- Most libraries install as a Vue plugin with app.use(), which is where they register components, provide a theme, and add global configuration.
- Registering a whole library globally can defeat tree-shaking; on-demand imports or an auto-import resolver keep unused components out of the bundle.
- The more a library styles for you, the faster you start and the harder it is to look like anything else; the less it styles, the more design work you own.
- Judge a library on Vue 3 and TypeScript support, accessibility, theming, release cadence, and who maintains it, not on its component count.
Why not build every component yourself?
A button is easy. A dropdown menu is not. To build one properly you need it to open on click and on Enter or Space, move focus into the menu, move between items with the arrow keys, jump to an item by typing its first letter, close on Escape and on a click outside, return focus to the trigger, flip upward when there’s no room below, and announce all of this correctly to screen readers with the right ARIA roles. Then you need the same care for dialogs, comboboxes, date pickers, tooltips, and tabs.
That behaviour is the real value of a component library. The visual styling is the easy part to replace. When you evaluate one, you’re mostly deciding how much of that behaviour you want to own, and how much of the look you’re willing to accept from someone else.
Three kinds of library
The Vue ecosystem has settled into three broad groups.
Full styled kits ship behaviour and a complete visual language together, usually with dozens or hundreds of components, including heavy ones like data tables and tree views:
- Vuetify follows Google’s Material Design closely.
- PrimeVue has a very large catalogue (its data table is a common reason teams pick it), design-token theming with presets, and an unstyled mode.
- Quasar is a full framework with its own CLI, targeting web, mobile, and desktop from one codebase.
- Element Plus and Naive UI are popular for admin dashboards and internal tools.
Tailwind-based kits are styled, but with Tailwind classes you can override, so they bend toward your design more easily. Nuxt UI is the main one; despite the name it also works in plain Vue apps through a Vite plugin.
Headless primitives give you the behaviour and accessibility with no styling at all:
- Reka UI (formerly called Radix Vue) provides unstyled, accessible primitives for menus, dialogs, popovers, selects, and more. Nuxt UI is built on it.
- shadcn-vue is the Vue port of shadcn/ui. Its CLI copies styled components built on Reka UI and Tailwind into your repository, so you own the code. It’s less a dependency and more a starting point.
The trade-off runs along one line. The more a library styles for you, the faster you get a working screen and the harder it is to look like anything other than that library. The less it styles, the more design work you own, and the more your product can look like your product.
How a library plugs into your app
Most styled libraries install as a plugin. The plugin is where they register components, provide theme configuration through provide, and sometimes add directives:
// main.ts
import { createApp } from 'vue'
import { createVuetify } from 'vuetify'
import 'vuetify/styles'
import App from './App.vue'
const vuetify = createVuetify({
theme: { defaultTheme: 'light' },
})
createApp(App).use(vuetify).mount('#app')
Watch how components get registered. If a plugin, or your own code, registers every component globally, the bundler can’t tell which ones you use, and all of them ship to the browser. Better options:
- Import where used:
import Button from 'primevue/button'in the component that needs it. - Auto-import at build time:
unplugin-vue-componentswith the library’s resolver scans your templates and adds the imports for you, so you get the convenience of global registration with tree-shaking intact. Several libraries ship their own Vite plugin that does this.
Headless libraries skip the plugin step entirely; you import primitives like any other component:
<script setup lang="ts">
import { DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal,
DropdownMenuContent, DropdownMenuItem } from 'reka-ui'
</script>
<template>
<DropdownMenuRoot>
<DropdownMenuTrigger class="btn">Options</DropdownMenuTrigger>
<DropdownMenuPortal>
<DropdownMenuContent class="menu">
<DropdownMenuItem class="menu-item" @select="rename">Rename</DropdownMenuItem>
<DropdownMenuItem class="menu-item" @select="remove">Delete</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenuPortal>
</DropdownMenuRoot>
</template>
Every class there is yours. The keyboard handling, focus return, outside-click dismissal, and ARIA roles come from Reka. DropdownMenuPortal uses Vue’s Teleport to render the menu at the end of body, out of any clipping container.
Theming without fighting the library
Each kind of library has a natural way to restyle it, and fighting that way is where projects get stuck:
- Styled kits expose a theme API (colours, radii, density, often as design tokens or CSS variables). Change the tokens first. Reaching for
:deep()to override internal class names is the last resort, because those names aren’t a public API and can change between releases. - Tailwind-based kits let you pass classes or a
uiconfig to override slots of a component. - Headless and copied components have no theme to fight. You edit the classes directly.
Choosing one
Ask these questions before the component count:
- Is it built for Vue 3 and the Composition API? Some older libraries were ported from Vue 2 and still show it. Check that the current major version targets Vue 3.
- TypeScript: are component props and events typed, so your editor catches mistakes?
- Accessibility: does the documentation describe keyboard interaction and ARIA for complex components? If it’s silent, assume the worst.
- Theming: can you match your design through tokens or classes, or only through overrides?
- Maintenance: how often does it release, how quickly are issues answered, and is there a company or a stable team behind it?
- Does it have the hard component you need? If your app lives in data grids, the quality of one data-table component can outweigh everything else.
React developers will find the same map: Vuetify and PrimeVue sit roughly where MUI and Ant Design do, and Reka UI with shadcn-vue mirror Radix with shadcn/ui.
What the video covers
Alexander Lichter opens by asking whether a “best” component library even exists, then walks through his own favourite: setup, a tour of its components, what sets it apart, how often it’s updated, and the people maintaining it. It is a useful model of how to evaluate a library, but it goes deep on one choice, so the survey of styled, Tailwind-based, and headless options above is this lesson’s addition. The Better Stack runner-up compares the two biggest styled kits side by side, and the Vue.js Nation talk shows the headless approach from the maintainer of what is now Reka UI.
Where this fits
Libraries build on styling Vue components and plugins. Next: performance optimization in Vue.
Check yourself
What does a headless library like Reka UI give you, and what does it leave to you?
It gives you the behaviour and accessibility of complex components, such as keyboard handling, focus trapping, ARIA roles and states, and positioning, with no visual styling at all. You supply every bit of the look, typically with Tailwind or your own CSS.
How is shadcn-vue different from installing a library like PrimeVue from npm?
shadcn-vue is not a dependency you import from node_modules. Its CLI copies each component's source code, built on Reka UI and styled with Tailwind, into your project, so you own and edit the code directly. Updates don't arrive through npm; you re-run the CLI or merge changes by hand.
Why might `app.use(SomeLibrary)` that registers every component globally make your bundle bigger than necessary?
Global registration imports every component up front so it can be used in any template, and the bundler can't tell which ones you never use, so they all ship. Importing components where they are used, or using an auto-import resolver that adds those imports at build time, lets tree-shaking drop the rest.
Your team has a strong custom brand and a designer producing bespoke screens. Which kind of library fits best, and why?
A headless library, or shadcn-vue on top of one. A fully styled kit like Vuetify fights you on every custom design, because you spend your time overriding its defaults; headless primitives give you the accessible behaviour and leave the visual design entirely to you.
Go deeper
Notes
Notes are saved to your account.
Everything else on this page works without one — progress and bookmarks keep themselves in this browser and come with you when you sign in. Notes are the one thing worth not trusting to a browser you might clear.
Your notes could not be loaded.