Loading...
Loading...
Use when working with Vunor, the Vue 3 + UnoCSS design system and component library. Covers presetVunor, vunorShortcuts/defineShortcuts/mergeVunorShortcuts, VunorVueResolver, Nuxt module, Vu-prefixed components, semantic UnoCSS classes (scope-*, layer-*, surface-*, current-*, c8-*, i8-*, card, fingertip, spacing, typography), palette/theme tuning, and shortcut override patterns. Imports: vunor, vunor/theme, vunor/utils, vunor/vite, vunor/nuxt.
npx skill4agent add mav-rik/vunor vunorpresetVunorSEMANTIC CLASSES scope-primary, layer-0, surface-100, c8-filled, i8-filled, card
↓ expand to (UnoCSS shortcuts, deep-merged from defineShortcuts() objects)
LOW-LEVEL UTILITIES bg-current, current-bg-scope-color-500, h-fingertip, p-$m
↓ resolve to (UnoCSS rules from presetVunor)
CSS CUSTOM PROPERTIES --scope-color-500, --current-bg, --v-fingertip, --card-spacingscope-primarybg-currentc8-filledsurface-100scope-errorscope-{name}scope-neutral:rootscope-neutralscope-primaryscope-secondaryscope-errorscope-warnscope-good<!-- Page-level scope is neutral (preflight default — no explicit class needed) -->
<body class="layer-0">
<header>…</header>
<!-- Brand accent: only the button opts into primary -->
<button class="scope-primary c8-filled">Save</button>
<!-- State change: same input, different scope = different visual weight -->
<VuInput v-model="email" :error="emailError" />
<!-- VuInput auto-applies scope-error internally when :error is set -->
<!-- Destructive action: opt into error scope explicitly -->
<button class="scope-error c8-flat">Delete account</button>
</body>primarysecondarygoodwarnerrorgreyneutral// uno.config.ts
import { defineConfig } from 'unocss'
import { presetVunor, vunorShortcuts } from 'vunor/theme'
export default defineConfig({
presets: [presetVunor({ palette: { colors: { primary: '#6B4EFF' } } })],
shortcuts: [vunorShortcuts()],
})// vite.config.ts — add VunorVueResolver for auto-import of <VuFoo>
import Components from 'unplugin-vue-components/vite'
import { VunorVueResolver } from 'vunor/vite'
plugins: [vue(), UnoCSS(), Components({ resolvers: [VunorVueResolver] })]
// OR, for Nuxt 3
modules: ['vunor/nuxt']<!-- App.vue -->
<html class="scope-primary">
<body class="layer-0">
<VuCard level="h3">
<VuCardHeader>Hello</VuCardHeader>
<VuButton class="c8-filled">Save</VuButton>
</VuCard>
</body>
</html>| File | Load when... |
|---|---|
| references/setup.md | Installing Vunor, configuring Vite or Nuxt, listing package exports |
| references/colors.md | Using |
| references/theme.md | Tuning palette (vividness, saturation, flatness, layersDepth, lightest/darkest), defining custom surfaces, configuring fingertip, baseRadius, typography, animations |
| references/typography.md | Choosing typography utilities, using golden-ratio spacing tokens, applying |
| references/cards.md | Building cards: |
| references/shortcuts.md | Customizing or overriding component styles, understanding c8 (clickable) and i8 (input) systems, using |
| references/rules.md | Looking up a specific UnoCSS rule pattern provided by Vunor ( |
| references/components.md | Using non-form components: VuCard, VuButton, VuDialog, VuTabs, VuMenu, VuPopover, VuAppLayout, VuAppToasts, VuIcon, VuLoadingIndicator, VuPagination, VuProgressBar |
| references/forms.md | Using form components: VuInput, VuSelect, VuCombobox, VuCheckbox, VuRadioGroup, VuSlider, VuDatePicker |
// Preset & shortcuts
import { presetVunor, vunorShortcuts, defineShortcuts,
mergeVunorShortcuts, toUnoShortcut } from 'vunor/theme'
import type { TVunorPaletteOptions, TVunorPaletteColor,
TVunorMainPaletteAdvanced, TVunorLayerPaletteAdvanced,
TVunorSurfaceConfig, TVunorTheme,
TVunorShortcut } from 'vunor/theme'
// PI composables (provide/inject)
import { useInputPi, useInputProps, useInputBaseProps,
useCardPI } from 'vunor'
import { useProvideInject } from 'vunor/utils'
// Vue / Nuxt integration
import { VunorVueResolver } from 'vunor/vite' // unplugin-vue-components resolver
// nuxt.config: modules: ['vunor/nuxt']
// Components (auto-imported when resolver/module is set up)
// <VuButton>, <VuCard>, <VuCardHeader>, <VuCardInner>, <VuDialog>, <VuTabs>,
// <VuMenu>, <VuMenuItem>, <VuPopover>, <VuAppLayout>, <VuAppToasts>,
// <VuIcon>, <VuLoadingIndicator>, <VuInnerLoading>, <VuLabel>, <VuPagination>,
// <VuProgressBar>, <VuOverflowContainer>, <VuCalendar>,
// <VuInput>, <VuInputBase>, <VuSelect>, <VuCombobox>, <VuCheckbox>,
// <VuRadioGroup>, <VuSlider>, <VuDatePicker>, <VuDevTools><!-- palette scope -->
<div class="scope-primary | scope-error | scope-good | scope-warn |
scope-secondary | scope-grey | scope-neutral">…</div>
<!-- depth backgrounds (auto light/dark) -->
<div class="layer-0">…</div> <!-- 0 outermost, 4 innermost -->
<!-- colored blocks (semantic background+text+border bundle) -->
<div class="surface-0">…</div> <!-- = layer-0 -->
<div class="surface-50 | surface-100 | … | surface-900">…</div>
<!-- direct CSS-var painting -->
<div class="current-bg-scope-color-500 current-text-white">
<span class="bg-current text-current">…</span>
</div>
<div class="bg-scope-color-500/50 text-scope-light-1">…</div>
<!-- clickable styles -->
<button class="c8-filled | c8-flat | c8-outlined | c8-light | c8-chrome">…</button>
<!-- c8-chrome stays neutral inside any scope (use for Cancel / Select all / None
buttons sitting next to a scoped primary CTA) -->
<!-- input styles -->
<div class="i8 i8-filled | i8-flat | i8-round">…</div>
<!-- card -->
<VuCard level="h3" rounded dense>…</VuCard>
<!-- spacing & typography -->
<p class="text-h1 text-mb-$m">Title</p> <!-- font-aware margin -->
<div class="p-$m gap-$s h-fingertip rounded-base">…</div>scope-*scope-neutral:rootscope-primaryscope-secondaryscope-errorscope-warnscope-goodbg-currenttext-currentborder-currenttext-current-hlbg-current/10bg-scope-color-500bg-primary-500<button class="c8-filled"><button class="bg-primary-500">bg-primary-500text-error-700<style>vunorShortcuts(myOverrides)--scope-light-*--scope-dark-*.darkprefers-color-scheme: darkdark:$p-$mgap-$sm-$lp-m--v-fingertiph-fingertipfingertip-xs|s|m|l|xlscope-{name}bg-currentlayer-*surface-*c8-*i8-*