Overview
Install Tile UI Vue from packages or consume the Vue registry.
Tile UI Vue can be consumed as packages or as copy-paste registry items distributed from the Vue site.
pnpm add @tile-ui/vue @tile-ui/styles @tile-ui/core
Import the shared global styles once in your app entry.
import '@tile-ui/styles/scss/globals.scss';
In Nuxt, a common option is to add the stylesheet in nuxt.config.ts.
export default defineNuxtConfig({
css: ['@tile-ui/styles/scss/globals.scss'],
});
import { TButton, TInput } from '@tile-ui/vue';
export default defineComponent({
setup() {
return () => (
<form class="form-group">
<TInput label="Project name" helperText="Shown in the dashboard and generated URLs." />
<TButton type="submit">Create project</TButton>
</form>
);
},
});
Use the registry when you want to pull source files into your project rather than consume the published package.
First, register the Tile UI namespace in components.json so shadcn can resolve shared registry dependencies without hardcoding the docs domain into each item:
{
"registries": {
"@tile-ui": "https://vue.tileui.zmorg.cn/r/{name}.json"
}
}
pnpm dlx shadcn@latest add @tile-ui/styles @tile-ui/button
pnpm dlx shadcn@latest add @tile-ui/card
The CLI will resolve shared items such as @tile-ui/core and @tile-ui/utils automatically.
Registry items currently write files into a structure like this:
components/ui/*
composables/*
styles/*
That keeps Vue components, composables, and shared SCSS assets colocated in a way that works well for Nuxt projects.
import '~/styles/globals.scss';