v2.1.8
/
  • Get Started
  • Components
  • Composables
  • Typography
  • GitHub
  • Layout
  • App
  • Container
  • Error
  • SidebarLayout
  • Element
  • Advice
  • Alert
  • Avatar
  • AvatarGroup
  • Badge
  • Banner
  • Button
  • Calendar
  • Card
  • Chip
  • Collapsible
  • Countdown
  • FieldGroup
  • Kbd
  • Progress
  • Separator
  • Skeleton
  • Form
  • Checkbox
  • CheckboxGroup
  • ColorPicker
  • FileUpload
  • Form
  • FormField
  • Input
  • InputDate
  • InputMenu
  • InputNumber
  • InputTags
  • InputTime
  • PinInput
  • RadioGroup
  • Range
  • Select
  • SelectMenu
  • Switch
  • Textarea
  • Data
  • Accordion
  • DescriptionList
  • Empty
  • Table
  • TableWrapper
  • Timeline
  • User
  • Navigation
  • Breadcrumb
  • CommandPalette
  • Link
  • NavigationMenu
  • Pagination
  • Stepper
  • Tabs
  • Overlay
  • ContextMenu
  • DropdownMenu
  • Modal
  • Popover
  • Slideover
  • Toast
  • Tooltip
  • Page
  • PageCard
  • PageColumns
  • PageGrid
  • PageLinks
  • PageList
  • Dashboard
  • DashboardGroup
  • DashboardSearch
  • DashboardSearchButton
  • AI Chat
  • soonChatMessage
  • soonChatMessages
  • soonChatPalette
  • soonChatPrompt
  • soonChatPromptSubmit
  • Content
  • ContentSearch
  • ContentSearchButton
  • ContentSurround
  • ContentToc
  • Color Mode
  • ColorModeAvatar
  • ColorModeButton
  • ColorModeImage
  • ColorModeSelect
  • ColorModeSwitch
  • i18n
  • LocaleSelect
  • b24icons
  • b24jssdk
Use our Nuxt starter
v2.1.8
  • Docs
  • Components
  • Composables
  • Typography

Skeleton

A toggle control for switching between two states.
GitHub
Demo
Nuxt UI

Usage

Use the Skeleton component as-is to display a placeholder.

{
  "wait": "Loading client-side content..."
}

Accent

Use the accent prop to change the variant of the Skeleton.

{
  "wait": "Loading client-side content..."
}

Examples

Something more complex

Example of a loading indicator for a task creation form.

{
  "wait": "Loading client-side content..."
}

API

Props

Prop Default Type
as'div'any

The element or component this component should render as.

accent'default' "default" | "accent" | "less"
b24ui { base?: ClassNameValue; }

Slots

Slot Type
default{}

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'
          }
        }
      }
    })
  ]
})

Separator

Divides content in a horizontal or vertical manner.

Checkbox

A toggle input for marking as checked or unchecked.

On this page

  • Usage
    • Accent
  • Examples
    • Something more complex
  • API
    • Props
    • Slots
  • Theme
Releases
Published under MIT License.

Copyright © 2024-present Bitrix24