Install
For Nuxt 4. The layer brings Nuxt UI, Inter and the Solar icons with it.
Terminal
npm install nuxt-ui-inknuxt.config.ts
export default defineNuxtConfig({
extends: ['nuxt-ui-ink'],
css: ['~/assets/css/main.css']
})app/assets/css/main.css
@import "tailwindcss";
@import "@nuxt/ui";
@import "nuxt-ui-ink/theme.css";Import the stylesheet from yours, after Tailwind and Nuxt UI, so Tailwind compiles them together.
What changes
- Surfaces have no border. A card, a field or a menu is drawn by a half-pixel line and a small shadow.
- The primary color is ink. The primary button has a soft gradient and a beveled edge. One blue accent is Nuxt UI's
secondaryandinfo. - Controls are smaller. Buttons are 20, 24, 28, 32 and 36px high from
xstoxl, four less than Nuxt UI's, with 13px text atmd. - Corners are 6 to 14px. Buttons 6, fields 7, menu rows 8, cards 10, menus 12, dialogs 14.
- A focused field darkens its edge. Keyboard focus on buttons and toggles is a blue ring.
- Icons are Solar. See Icons.
Customizing
Colors, shadows and the corner size are CSS variables. Set them after the import. Tokens lists them.
app/assets/css/main.css
:root {
--ui-radius: 0.375rem;
--ink-page: #fafafa;
}
.dark {
--ink-page: #000;
}Component overrides are in the layer's app.config. Yours is merged over it.
app/app.config.ts
export default defineAppConfig({
ui: {
colors: { secondary: 'violet', info: 'violet' },
card: { slots: { body: 'p-6' } }
}
})Good to know
bg-elevatedandbg-accentedare translucent (black at 4% and 7% in light mode), so they show on the gray page and on white cards alike. Two stacked get darker, and they do not hide what is behind them. Usebg-(--ink-solid)where that matters.- The half-pixel lines are sharp on high-density screens and can look softer on a 1x display.
- Fields keep their height (32px at
md) and use 13px text on desktop. On phones they stay at 16px, so the browser does not zoom into them. - A button joined to a field in a
UFieldGrouptakes the field's height. - Pagination keeps Nuxt UI's default look. For the quieter one, pass
variant="ghost",active-color="neutral"andactive-variant="soft".