pnpm add pohon-ui
npm install pohon-ui
bun add pohon-ui
shamefully-hoist=true in your .npmrc file or install unocss in your project's root directory.nuxt.config.tsexport default defineNuxtConfig({
modules: ['pohon-ui']
});
import { defineConfig } from 'unocss';
export default defineConfig({
});
export default defineNuxtConfig({
modules: [
'pohon-ui',
'@unocss/nuxt',
],
});
<template>
<PApp>
<NuxtPage />
</PApp>
</template>
To quickly get started with Pohon UI, you can use the starter template by running:
npm create nuxt@latest -- -t pohon-ui
You can also get started with one of our official templates:
You can use the Use this template button on GitHub to create a new repository or use the CLI:
pnpm create nuxt@latest -- -t pohon-ui
pnpm create nuxt@latest -- -t pohon-ui/docs
pnpm create nuxt@latest -- -t pohon-ui/dashboard
You can customize Pohon UI by providing options in your nuxt.config.ts.
prefixUse the prefix option to change the prefix of the components.
Pexport default defineNuxtConfig({
modules: ['pohon-ui'],
pohon: {
prefix: 'Nuxt'
}
});
fontsUse the fonts option to enable or disable the @nuxt/fonts module.
trueexport default defineNuxtConfig({
modules: ['pohon-ui'],
pohon: {
fonts: false
}
});
colorModeUse the colorMode option to enable or disable the @nuxt/color-mode module.
trueexport default defineNuxtConfig({
modules: ['pohon-ui'],
pohon: {
colorMode: false
}
});
theme.colorsUse the theme.colors option to define the dynamic color aliases used to generate components theme.
['primary', 'secondary', 'success', 'info', 'warning', 'error']export default defineNuxtConfig({
modules: ['pohon-ui'],
pohon: {
theme: {
colors: ['primary', 'error']
}
}
});
theme.defaultVariantsUse the theme.defaultVariants option to override the default color and size variants for components.
{ color: 'primary', size: 'md' }export default defineNuxtConfig({
modules: ['pohon-ui'],
pohon: {
theme: {
defaultVariants: {
color: 'neutral',
size: 'sm'
}
}
}
});
mdcUse the mdc option to force the import of Pohon UI <Prose> components even if @nuxtjs/mdc or @nuxt/content is not installed.
falseexport default defineNuxtConfig({
modules: ['pohon-ui'],
pohon: {
mdc: true
}
});
contentUse the content option to force the import of Pohon UI <Prose> and <PContent> components even if @nuxt/content is not installed (@nuxtjs/mdc is installed by @nuxt/content).
falseexport default defineNuxtConfig({
modules: ['pohon-ui'],
pohon: {
content: true
}
});
Pohon UI uses pkg.pr.new for continuous preview releases, providing developers with instant access to the latest features and bug fixes without waiting for official releases.
Automatic preview releases are created for all commits and PRs to the main branch. Use them by replacing your package version with the specific commit hash or PR number.
{
"dependencies": {
- "pohon-ui": "^1.0.0",
+ "pohon-ui": "https://pkg.pr.new/pohon-ui@4c96909",
}
}