Loading

Purpose

Skeleton loading states provide an indication that the application is actively loading, as well as feedback about how and where content will be placed when fully loaded.

These are best used for content-rich layouts, such as a video grid, transcript, or meetings list.

SkeletonText

Use the SkeletonText component to represent text that is loading.

Usage

import {SkeletonText} from '@loomhq/lens'
<SkeletonText lines={1} size="body-md" />

Sizes

Number of lines

Animation

Use the animated prop to indicate that loading is actively happening.

SkeletonContainer

The SkeletonContainer is used to represent non-text elements of a UI, such as an avatar, icon or thumbnail.

Usage

import {SkeletonContainer} from '@loomhq/lens'
<SkeletonContainer />

Setting height, width, and radius

The styling of the SkeletonContainer is limited to setting the height, width, and border radius.

Animation

Just like SkeletonText, you can use the animated prop to indicate that loading is actively happening.

Combining SkeletonText and SkeletonContainer

While useful on their own, SkeletonText and SkeletonContainer can be combined to represent richer UI elements.

Props

SkeletonText

name
type
default
size
TextSize
'body-md'
lines
number
1
animated
boolean
false

SkeletonContainer

name
type
default
animated
boolean
false
height
string
'40px'
radius
'medium' | 'large' | 'xlarge' | 'full'
'full'
width
string
'40px'