← Back to list
1. Global Configuration (
2. App Configuration (
3. Component Level (
4. Utility Classes (
Using

nuxt-ui-theming
by zatkniz
⭐ 0🍴 0📅 Jan 13, 2026
SKILL.md
name: nuxt-ui-theming description: Help customize Nuxt UI component themes and colors. Use when users ask about styling, theming, or customizing component appearance.
Nuxt UI Theming Guide
Assist with customizing Nuxt UI component themes, colors, and appearance.
When to Use
DO USE when:
- User wants to customize component appearance
- Questions about theme configuration
- Need to change colors or design tokens
- Want to create custom component variants
- Questions about the
uiprop
DO NOT USE when:
- Basic component usage (covered in instructions)
- Finding which components exist (use nuxt-ui-component-finder)
Theming Levels
1. Global Configuration (nuxt.config.ts)
export default defineNuxtConfig({
ui: {
// Change component prefix (default: 'U')
prefix: 'Nuxt',
// Define theme colors
theme: {
colors: ['primary', 'secondary', 'success', 'error'],
transitions: true,
defaultVariants: {
color: 'primary',
size: 'md'
}
}
}
})
2. App Configuration (app/app.config.ts)
export default defineAppConfig({
ui: {
// Global component defaults
button: {
default: {
color: 'primary',
size: 'md'
}
}
}
})
3. Component Level (ui prop)
<UButton
:ui="{
base: 'font-bold',
variant: {
solid: 'bg-blue-500 hover:bg-blue-600'
}
}"
>
Custom Button
</UButton>
4. Utility Classes (class prop)
<UButton class="shadow-lg rounded-full">
Button with classes
</UButton>
Color System
Semantic Colors
Default semantic colors (configurable):
primary- Main brand colorsecondary- Secondary brand colorsuccess- Success states (green)error- Error states (red)warning- Warning states (yellow/orange)info- Info states (blue)neutral- Neutral/gray
Using Colors
<template>
<UButton color="primary">Primary</UButton>
<UButton color="error">Error</UButton>
<UAlert color="success">Success message</UAlert>
</template>
Custom Colors
Add custom colors in Tailwind config:
// nuxt.config.ts
export default defineNuxtConfig({
ui: {
theme: {
colors: ['primary', 'secondary', 'brand', 'accent']
}
}
})
Component Customization
Using ui Prop
The ui prop accepts an object matching the component's theme structure:
<template>
<!-- Button customization -->
<UButton
:ui="{
base: 'relative disabled:cursor-not-allowed',
variant: {
solid: 'bg-{color}-500 hover:bg-{color}-600',
outline: 'border-2 border-{color}-500'
},
size: {
lg: 'px-6 py-3 text-lg'
}
}"
>
Custom Button
</UButton>
<!-- Card customization -->
<UCard
:ui="{
header: {
base: 'border-b',
padding: 'px-6 py-4'
},
body: { padding: 'p-6' }
}"
>
<template #header>Header</template>
Body content
</UCard>
</template>
Slots-Based Theming
Components use slots for theme customization:
<UCard
:ui="{
header: { base: 'bg-gray-50' },
body: { base: 'space-y-4' },
footer: { base: 'bg-gray-50' }
}"
>
<template #header>Custom Header Styling</template>
Body with custom spacing
<template #footer>Custom Footer</template>
</UCard>
Common Patterns
Creating Reusable Themed Components
<!-- components/BrandButton.vue -->
<template>
<UButton
v-bind="$attrs"
:ui="{
variant: {
solid: 'bg-gradient-to-r from-purple-500 to-pink-500'
}
}"
>
<slot />
</UButton>
</template>
Dark Mode Styling
<UButton
:ui="{
variant: {
solid: 'bg-blue-500 dark:bg-blue-600'
}
}"
>
Dark mode aware
</UButton>
Responsive Theming
<UCard
:ui="{
body: {
padding: 'p-4 md:p-6 lg:p-8'
}
}"
>
Responsive padding
</UCard>
Process
User wants to customize a component:
- Identify component (e.g., "Button")
- Use
mcp_nuxt-ui_get-component-metadatato see theme structure - Provide
uiprop example for requested customization - Suggest global config if change should be app-wide
User wants to change brand colors:
- Explain semantic color system
- Show
nuxt.config.tstheme.colors configuration - Provide Tailwind color palette setup if needed
- Show component usage with new colors
User wants custom variants:
- Get component theme structure
- Show how to extend variants with
uiprop - Suggest creating wrapper component for reuse
Resources
Tips
- Use
uiprop for component-level customization - Use
app.config.tsfor app-wide defaults - Use
classprop for simple utility class additions - Color placeholders like
{color}are replaced at runtime - Dark mode classes (
dark:) work automatically with color mode - Check component metadata for available theme slots
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon