What is a Nuxt Layer?
Nuxt Layers allow you to share and reuse components, composables, assets, and configurations across multiple Nuxt projects. By extending this design system layer, you automatically get access to all its features without manual setup.Installation
Install the package
Install the design system using your preferred package manager:Or with yarn:Or with pnpm:
Configure your Nuxt project
Add the package to the
extends property in your nuxt.config.ts file:nuxt.config.ts
Extending Multiple Layers
You can extend multiple layers in your Nuxt configuration. Simply add them to theextends array:
nuxt.config.ts
What Gets Extended
When you extend this layer, your project automatically inherits:- Components: All UI components are auto-imported
- Composables: Shared Vue composables for common functionality
- Assets: CSS files and styles from the design system
- Configuration: Pre-configured modules and settings including:
- @nuxt/ui module with custom theme colors (primary, secondary, accent, info, success, warning, error)
- Tailwind CSS with @tailwindcss/vite plugin
- CSS imports from the layer’s assets
Layer Configuration
The layer includes the following key configurations that will be merged with your project:Overriding Layer Defaults
You can override any layer configuration in your ownnuxt.config.ts. Your project’s configuration takes precedence over the layer’s defaults.
For example, to customize the UI theme colors:
nuxt.config.ts
NPM Package Information
The package is published as
design-system-dashboard-devmunity on npm. Check the npm registry for the latest version and release notes.Migration Notes
The component library is currently being migrated from an older version. New components and features are being added regularly. Check the Storybook for the latest available components.
Next Steps
- Explore available components in Storybook
- Learn about local development if you want to contribute
- Check the Component Overview for detailed component documentation