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.
pnpm dlx shadcn@latest add https://vue.tileui.zmorg.cn/r/button.json
pnpm dlx shadcn@latest add https://vue.tileui.zmorg.cn/r/card.json
Most Vue registry installs should start with these shared items so component dependencies resolve cleanly.
pnpm dlx shadcn@latest add https://vue.tileui.zmorg.cn/r/styles.json
pnpm dlx shadcn@latest add https://vue.tileui.zmorg.cn/r/core.json
pnpm dlx shadcn@latest add https://vue.tileui.zmorg.cn/r/utils.json
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 '@tile-ui/styles/scss/globals.scss';
If you are consuming copied registry styles locally, point the import at the generated path instead.
import '~/styles/globals.scss';