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="rounded-full size-12" />
<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. |
class | any | |
ui | { base?: any; } |
Slots
| Slot | Type |
|---|
Theme
app.config.ts
export default defineAppConfig({
ui: {
skeleton: {
base: 'animate-pulse rounded-md bg-background-elevated'
}
}
})vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ui from 'pohon-ui/vite'
export default defineConfig({
plugins: [
vue(),
ui({
ui: {
skeleton: {
base: 'animate-pulse rounded-md bg-background-elevated'
}
}
})
]
})Changelog
No recent changes