Icons
Pohon UI integrates with Iconify to access over 200,000+ icons.
Usage
Icon component
You can use the Icon component with a name prop to display an icon:
<template>
<PIcon name="i-lucide:lightbulb" class="size-5" />
</template>
You can use any name from the https://icones.js.org collection.
When using collections with a dash (
-), you need to separate the icon name from the collection name with a colon (:) as @iconify/vue does not handle this case like @nuxt/icon. For example, instead of i-simple-icons:github you need to write i-simple-icons:github or simple-icons:github.Learn more about the Iconify naming convention.Component props
Some components also have an icon prop to display an icon, like the Button for example:
<template>
<PButton icon="i-lucide:sun" variant="subtle">Button</PButton>
</template>
Theme
You can change the default icons used by Pohon UI components in your vite.config.ts:
app.config.ts
export default defineAppConfig({
pohon: {
icons: {
arrowDown: 'i-lucide:arrow-down',
arrowLeft: 'i-lucide:arrow-left',
arrowRight: 'i-lucide:arrow-right',
arrowUp: 'i-lucide:arrow-up',
caution: 'i-lucide:circle-alert',
check: 'i-lucide:check',
chevronDoubleLeft: 'i-lucide:chevrons-left',
chevronDoubleRight: 'i-lucide:chevrons-right',
chevronDown: 'i-lucide:chevron-down',
chevronLeft: 'i-lucide:chevron-left',
chevronRight: 'i-lucide:chevron-right',
chevronUp: 'i-lucide:chevron-up',
close: 'i-lucide:x',
copy: 'i-lucide:copy',
copyCheck: 'i-lucide:copy-check',
dark: 'i-lucide:moon',
drag: 'i-lucide-grip-vertical',
ellipsis: 'i-lucide:ellipsis',
error: 'i-lucide:circle-x',
external: 'i-lucide:arrow-up-right',
eye: 'i-lucide:eye',
eyeOff: 'i-lucide:eye-off',
file: 'i-lucide:file',
folder: 'i-lucide:folder',
folderOpen: 'i-lucide:folder-open',
hash: 'i-lucide:hash',
info: 'i-lucide:info',
light: 'i-lucide:sun',
loading: 'i-lucide:loader-circle',
menu: 'i-lucide:menu',
minus: 'i-lucide:minus',
panelClose: 'i-lucide:panel-left-close',
panelOpen: 'i-lucide:panel-left-open',
plus: 'i-lucide:plus',
reload: 'i-lucide:rotate-ccw',
search: 'i-lucide:search',
stop: 'i-lucide:square',
success: 'i-lucide:circle-check',
system: 'i-lucide:monitor',
tip: 'i-lucide:lightbulb',
upload: 'i-lucide:upload',
warning: 'i-lucide:triangle-alert'
}
}
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import pohon from 'pohon-ui/vite'
export default defineConfig({
plugins: [
vue(),
pohon({
pohon: {
icons: {
arrowDown: 'i-lucide:arrow-down',
arrowLeft: 'i-lucide:arrow-left',
arrowRight: 'i-lucide:arrow-right',
arrowUp: 'i-lucide:arrow-up',
caution: 'i-lucide:circle-alert',
check: 'i-lucide:check',
chevronDoubleLeft: 'i-lucide:chevrons-left',
chevronDoubleRight: 'i-lucide:chevrons-right',
chevronDown: 'i-lucide:chevron-down',
chevronLeft: 'i-lucide:chevron-left',
chevronRight: 'i-lucide:chevron-right',
chevronUp: 'i-lucide:chevron-up',
close: 'i-lucide:x',
copy: 'i-lucide:copy',
copyCheck: 'i-lucide:copy-check',
dark: 'i-lucide:moon',
drag: 'i-lucide-grip-vertical',
ellipsis: 'i-lucide:ellipsis',
error: 'i-lucide:circle-x',
external: 'i-lucide:arrow-up-right',
eye: 'i-lucide:eye',
eyeOff: 'i-lucide:eye-off',
file: 'i-lucide:file',
folder: 'i-lucide:folder',
folderOpen: 'i-lucide:folder-open',
hash: 'i-lucide:hash',
info: 'i-lucide:info',
light: 'i-lucide:sun',
loading: 'i-lucide:loader-circle',
menu: 'i-lucide:menu',
minus: 'i-lucide:minus',
panelClose: 'i-lucide:panel-left-close',
panelOpen: 'i-lucide:panel-left-open',
plus: 'i-lucide:plus',
reload: 'i-lucide:rotate-ccw',
search: 'i-lucide:search',
stop: 'i-lucide:square',
success: 'i-lucide:circle-check',
system: 'i-lucide:monitor',
tip: 'i-lucide:lightbulb',
upload: 'i-lucide:upload',
warning: 'i-lucide:triangle-alert'
}
}
})
]
})