Grapes homepage1.57.0
  • Guide
  • Tokens
  • Components
    Grapes on GithubGrapes on Figma
    Interaction
    • Button
    • IconButton
    • FloatingActionBar
    • Link
    Icons
    • Icon
    • HighlightIcon
    Form
    • AmountInput
    • Autocomplete
    • AutocompleteMultiple
    • AutocompletePlace
    • CheckboxBox
    • CheckboxField
    • DatePicker
    • FormField
    • Input
    • OptionGroup
    • PasswordInput
    • PhoneInput
    • RadioBox
    • RadioField
    • RadioGroup
    • Select
    • SwitchField
    • TextArea
    • TextInput
    • Upload
    • UploadButton
    Feedback
    • Badge
    • Banner
    • Callout
    • EmptyState
    • Modal
    • ModalSlideshow
    • DeprecatedModalSlideshow
    • PageModal
    • Skeleton
    • Tag
    • Toast
    • Tooltip
    Data display
    • Accordion
    • Avatar
    • Box
    • Calendar
    • CalendarRange
    • CollapsibleList
    • FileCard
    • InfoTip
    • ListBox
    • ListView
    • Panel
    • SidePanel
    • DeprecatedPreview
    • Table
    • Timeline
    • useDateFormatter
    Navigation
    • DropdownItem
    • DropdownMenu
    • Navigation
    • NavigationItem
    • Popover
    • Tabs

    Skeleton

    This component provides a placeholder while you wait for the content to load. The width and height of this component are fully customizable.

    View source code
    • Usage
    • Props

    Skeleton

    Usage

    Predefined skeleton components are available, such as Avatar, Button, Table, etc. You should only use this generic skeleton if none of the other components fit your design.

    <Skeleton height="24px" width="360px" />
    

    SkeletonAvatar

    This component provides a placeholder for the Avatar component.

    <>
      <SkeletonAvatar size="s" variant="square" />
      <SkeletonAvatar size="m" variant="square" />
      <SkeletonAvatar size="l" variant="square" />
      <SkeletonAvatar size="s" variant="circle" />
      <SkeletonAvatar size="m" variant="circle" />
      <SkeletonAvatar size="l" variant="circle" />
    </>
    

    SkeletonButton

    This component provides a placeholder for the Button component. The ButtonSkeleton can be used as is or with a custom width. The height cannot be changed and fits with the Button component.

    <>
      <SkeletonButton />
      <SkeletonButton width="360px" />
    </>
    

    SkeletonCheckbox

    This component provides a placeholder for the Checkbox component. The height and width are fixed to fit with the Checkbox component.

    <SkeletonCheckbox />
    

    SkeletonTable

    This component provides a placeholder for the Table component. Like the Table component, some customization options are available:

    • The rowHeight prop changes the size of the rows
    • The withHeader prop displays the header if needed
    • The numberOfRows prop allows to specify the number of rows to display (defaults to 5)
    <SkeletonTable
      numberOfRows={5}
      columns={[
        {
          cell: (
            <>
              <SkeletonCheckbox className="mr-16" />
              <SkeletonText width="80%" />
            </>
          ),
          header: (
            <>
              <SkeletonCheckbox className="mr-16" />
              <SkeletonText width="50%" />
            </>
          ),
        },
      ]}
      withHeader
    />
    

    SkeletonTag

    This component provides a placeholder for the Tag component. The TagSkeleton can be used as is or with a custom width. The height cannot be changed and fits with the Tag component.

    <>
      <SkeletonTag />
      <SkeletonTag width="360px" />
    </>
    

    SkeletonText

    This component provides a placeholder for the Text component. Five different sizes are provided.

    <>
      <SkeletonText size="s" />
      <SkeletonText size="m" />
      <SkeletonText size="l" />
      <SkeletonText size="xl" />
      <SkeletonText size="xxl" />
    </>