Skeleton
A placeholder to show while content is loading.
Usage
Use the Skeleton component as-is to display a placeholder.
<template>
<div class="flex gap-4 items-center">
<PSkeleton class="h-12 w-12 akar:rounded-full" />
<div class="gap-2 grid">
<PSkeleton class="h-4 w-[250px]" />
<PSkeleton class="h-4 w-[200px]" />
</div>
</div>
</template>
API
Props
| Prop | Default | Type |
|---|---|---|
as | 'div' | anyThe element or component this component should render as. |
pohon | { base?: any; }
|
Slots
| Slot | Type |
|---|---|
default | {} |
Theme
We use unocss-variants to customize the theme. Read more about it in the theming guide.
Below is the theme configuration skeleton for the PSkeleton. Since the component is provided unstyled by default, you will need to fill in these values to apply your own custom look and feel. If you prefer to use our pre-built, opinionated styling, you can instead use our UnoCSS preset, this docs is using it as well.
app.config.ts
export default defineAppConfig({
pohon: {
skeleton: {
base: ''
}
}
};
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import pohon from 'pohon-ui/vite'
export default defineAppConfig({
pohon: {
skeleton: {
base: ''
}
}
};
Changelog
No recent changes