This guide follows Installation step by step for Nuxt. Vue projects use the shadcn-vue CLI and
the /r/vue/ registry.
1. Add Tailwind CSS v4
Trame UI needs Tailwind CSS v4. If your project does not have it yet, follow Tailwind’s Nuxt guide. In short:
npm install tailwindcss @tailwindcss/vite
// nuxt.config.ts
import tailwindcss from '@tailwindcss/vite'
export default defineNuxtConfig({
css: ['~/assets/css/main.css'],
vite: { plugins: [tailwindcss()] },
})
2. Allow imports with their extension
Trame’s files import ./x.ts. Without this option, type checking fails with TS5097. In Nuxt, set it through
nuxt.config.ts, so it reaches the tsconfig Nuxt generates:
// nuxt.config.ts
export default defineNuxtConfig({
typescript: {
tsConfig: { compilerOptions: { allowImportingTsExtensions: true } },
},
})
Merge it with the config from step 1.
3. Write components.json
npx shadcn-vue@latest init asks questions. You can write components.json at the root yourself instead:
{
"$schema": "https://shadcn-vue.com/schema.json",
"style": "new-york",
"typescript": true,
"tailwind": { "config": "", "css": "assets/css/main.css", "baseColor": "neutral", "cssVariables": true },
"aliases": {
"components": "@/components",
"ui": "@/components/ui",
"lib": "@/lib",
"utils": "@/lib/utils",
"composables": "@/composables"
},
"iconLibrary": "lucide",
"registries": {
"@trame": {
"url": "https://trame-ui.com/r/vue/{name}.json",
"headers": { "Authorization": "Bearer ${TRAME_KEY}" }
}
}
}
Set tailwind.css to your main CSS file. In a Nuxt 4 project, the app lives in app/ by default, so the CSS is
app/assets/css/main.css. The CLI puts the files where the @/components alias points.
4. Put your key in .env
Components and themes install without a key. Blocks need one. Create it in your dashboard, then:
TRAME_KEY=trame_your_key_here
Keep .env out of git. See Your key.
5. Add an item
Run the CLI from the project root:
npx shadcn-vue@latest add @trame/steps-cards
The files land in components/trame/ under your components folder (app/components/trame/ when the app lives in
app/).
6. Import the styles
In your main CSS, replace @import 'tailwindcss'; with Trame’s index.css. It imports Tailwind itself:
/* assets/css/main.css */
@import '../../components/trame/styles/index.css';
The path is relative to the CSS file. It is the same in Nuxt 4, where both folders sit under app/.
7. Use the block
<script setup lang="ts">
import StepsCards from '~/components/trame/blocks/steps/steps-cards.vue'
</script>
<template>
<StepsCards
title="How it works"
:steps="[{ title: 'Choose a plan' }, { title: 'Set up your account' }, { title: 'Invite your team' }]"
/>
</template>
Without a host context, blocks use a demo one: links point to #action. Give them yours, as
Using blocks shows.