Usage
Use the Skeleton component as-is to display a placeholder.
Accent
Use the accent prop to change the variant of the Skeleton.
Examples
Something more complex
Example of a loading indicator for a task creation form.
API
Props
Slots
Theme
app.config.ts
export default defineAppConfig({
b24ui: {
skeleton: {
slots: {
base: 'animate-pulse rounded-(--ui-border-radius-md) '
},
variants: {
accent: {
default: 'bg-(--ui-color-g-glass-grey-bg-1)',
accent: 'bg-(--ui-color-g-glass-grey-bg-2)',
less: 'bg-(--ui-color-g-glass-grey-bg-3)'
}
},
defaultVariants: {
accent: 'default'
}
}
}
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import bitrix24UIPluginVite from '@bitrix24/b24ui-nuxt/vite'
export default defineConfig({
plugins: [
vue(),
bitrix24UIPluginVite({
b24ui: {
skeleton: {
slots: {
base: 'animate-pulse rounded-(--ui-border-radius-md) '
},
variants: {
accent: {
default: 'bg-(--ui-color-g-glass-grey-bg-1)',
accent: 'bg-(--ui-color-g-glass-grey-bg-2)',
less: 'bg-(--ui-color-g-glass-grey-bg-3)'
}
},
defaultVariants: {
accent: 'default'
}
}
}
})
]
})