Quick start
It's dangerous to go alone! Take this. Install the kit, add your first component and set up what your app needs once.
Kappa UI is a Vue 3 UI kit in two halves. Components are Vue files copied into your project, so the code is yours to read and change. The core package, @kappa-ui/core, holds the behaviour behind them, such as overlays, toasts and directives, and updates from npm like any other dependency.
Components, copied in by the CLI.
Yours to editThe behaviour behind them, from npm.
Updates with npmInstall
You need a Vue 3 or Nuxt project with Tailwind CSS v4. Version 3 won't do: components use utilities it doesn't have.
- Set up the project once:
npx shadcn-vue@latest init --preset https://kappa-ui.pages.dev/r/init.json
You get acomponents.json, thecn()helper, and the tokens and default theme in your stylesheet. Tokens are the CSS variables components read, such as--primaryor--radius: change one, and every component that reads it follows. - Find this line in your stylesheet. Init added it, so leave it there:
@import "@kappa-ui/core/tailwind.css";
It brings the utilities components are drawn with, and updates with the core package.
Using Nuxt? Add a bit of config too. Already have a components.json? Skip init and follow Installation instead.
Add a component
- Add the button:
npx shadcn-vue@latest add @kappa-ui/button
The component lands incomponents/ui/button. It's your code now: edit it however you like. - Use it:
<script setup lang="ts"> import { Button } from '@/components/ui/button' </script> <template> <Button variant="outline" color="neutral">Button</Button> </template>variantis the look:solid,soft,subtle,outline,ghostorlink.colorpicks the tone, the colour it's drawn in:primary,neutral,destructive,success,warningorinfo.sizeruns fromxstoxl, on one scale shared by every control.
Two things hold for every component:
- It takes one
classprop, merged over its own classes, so yours win. - Its root carries a
data-slotattribute, so you can target it from CSS and tests without relying on class names.
One-time app setup
Some components need a line or two at the app root, once. Skip what you don't use.
ConfigProviderwith:scroll-body="false"around the app. You need this if you use a select, a menu, a dialog, a drawer or a modal popover. Kappa UI keeps the scrollbar's space while one is open, so without:scroll-body="false", Reka UI pads the page a second time and it jumps sideways. OverlayscreateDialogs()and oneDialogHost. You need this if you open dialogs, drawers or confirms from code. DialogcreateToaster()and oneToaster. You need this if you show toasts. ToastTooltipProvideraround the app. Optional: tooltips work without it, but with it, the next tooltip along a toolbar opens instantly. Tooltipapp.directive('ripple', vRipple). You need this if you putv-rippleon your own elements. Kappa UI's pressable parts import it themselves. RippleDrawerIndentaround the app. Optional: the page steps back while a drawer is open. PutDialogHostinside it. Drawer
All of it together, in a Vite app:
// main.ts
import { createApp } from 'vue'
import { createDialogs } from '@/components/ui/dialog'
import { createToaster } from '@/components/ui/toast'
import vRipple from '@/lib/ripple'
import App from './App.vue'
const app = createApp(App)
app.use(createDialogs())
app.use(createToaster())
app.directive('ripple', vRipple)
app.mount('#app')
<!-- App.vue -->
<script setup lang="ts">
import { ConfigProvider } from 'reka-ui'
import { DialogHost } from '@/components/ui/dialog'
import { Toaster } from '@/components/ui/toast'
import { TooltipProvider } from '@/components/ui/tooltip'
</script>
<template>
<ConfigProvider :scroll-body="false">
<TooltipProvider>
<RouterView />
<DialogHost />
</TooltipProvider>
<Toaster />
</ConfigProvider>
</template>
In Nuxt, install createDialogs() and createToaster() from plugins instead, as Dialog and Toast show.
Next
- Theming: make it yours, starting with the brand colour.
- Typography: size text by what it does.
- Overlays: why the first click outside a menu only closes it.
- Accessibility: small controls that are still easy to tap.
- Most people start with Button, Input and Dialog.