@takuhii/bricks-nuxt
v1.4.0
Published
Nuxt 3 module for zero-config Bricks integration — SSR-safe component registration, CSS injection, and theme support
Readme
@takuhii/bricks-nuxt
Nuxt 3 module for zero-config integration of the Bricks component library.
Installation
pnpm add @takuhii/bricks @takuhii/bricks-nuxtUsage
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@takuhii/bricks-nuxt'],
})That's it. All W* components are available globally in templates without imports.
What It Does
- Registers all Bricks components globally — SSR-safe, no CSS-in-JS issues
- Injects stylesheets — reset, styleguide, and theme CSS in the correct order
- Provides theme CSS variables —
:rootcustom properties for the default theme - Transpiles @takuhii/bricks-core — ensures Vite processes it correctly
- Auto-imports composables —
usePrice,useCarousel,useCloudinaryConfig,provideCloudinaryConfig - Adds component types — template intellisense for all
W*components
Options
export default defineNuxtConfig({
modules: ['@takuhii/bricks-nuxt'],
bricks: {
theme: 'default', // Brand theme to apply
globalComponents: true, // Register all components globally
composables: true, // Auto-import composables
},
})License
MIT
