Skip to main content
Elastic UI
Elastic UI
ComponentsPatternsContentData visualization
EUI ChangelogGitHubFigma
  • Guidelines
    • Getting started
    • Accessibility
    • Writing
    • Testing
  • Theming
    • Theme provider
    • Color mode
    • High contrast mode
    • Borders
    • Breakpoints
    • Colors
    • Sizing
    • Typography
  • Templates
    • Page template
    • Sitewide search
  • Layout
    • Accordion
    • Bottom bar
    • Flex
    • Flyout
    • Header
    • Horizontal rule
    • Modal
    • Page components
    • Page header
    • Panel
    • Popover
    • Resizable container
    • Spacer
  • Navigation
    • Breadcrumbs
    • Buttons
    • Collapsible nav
    • Context menu
    • Facet
    • Key pad menu
    • Link
    • Pagination
    • Side nav
    • Steps
    • Tabs
    • Tree view
  • Display
    • Aspect ratio
    • Avatar
    • Badge
    • Callout
    • Card
    • Comment list
    • Description list
    • Drag and drop
    • Empty prompt
    • Health
    • Icons
    • Image
    • List group
    • Loading
    • Progress
    • Skeleton
    • Stat
    • Text
    • Timeline
    • Title
    • Toast
    • Tooltip
    • Tour
  • Forms
    • Form controls
    • Form layouts
    • Form validation
    • Text controls
    • Numeric controls
    • Selection controls
    • Search and filter controls
    • Date and time controls
    • Other controls
  • Tabular content
    • Tables
    • Data grid
  • Editors & Syntax
    • Code
    • Markdown
  • Utilities
    • Accessibility
    • Auto sizer
    • Beacon
    • Color palettes
    • Copy
    • CSS utility classes
    • Delay
    • Error boundary
    • Focus trap
    • Highlight and mark
    • HTML ID generator
    • I18n
    • Inner text
    • Mutation observer
    • Outside click detector
    • Overlay mask
    • Portal
    • Pretty duration
    • Provider
    • Resize observer
    • Scroll
    • Text diff
    • Text truncation
    • Window events
  • EUI
  • Display
  • Skeleton

Skeleton

The EuiSkeleton components are placeholder components for content which has yet to load. They provide meaningful previews, avoid layout content shifts, and add accessible announcements to screen readers when content is done loading.

Accessibility recommendation

The

contentAriaLabel prop should be used to help describe the type of content that is loading to screen reader users. If you do not provide a descriptive label and have have multiple loading skeletons on the page, screen reader users may hear a multitude of “Loaded” messages in a row, with no meaningful indication of what actually loaded.

Text

Use EuiSkeletonText to display a placeholder for multiple lines of text.

Loading...

Title

Use EuiSkeletonTitle to display a placeholder for heading titles.

Loading...

Circle

Use EuiSkeletonCircle to display a circular preview, mainly for avatars.

Loading...

Rectangle

EuiSkeletonRectangle allows you define a large and customizable shape via its width, height, and borderRadius props.

Loading...

Combining multiple skeletons

EuiSkeletonLoading is a light wrapper around the EuiSkeleton components that handles loading accessibility and flipping between skeleton and loaded content.

As you may have noticed in the previous demos, toggling multiple skeletons to their loaded state all at once triggers multiple queued screen reader announcements, which can be annoying to SR users.

To circumvent this, use EuiSkeletonLoading to handle a single parent-level isLoading state. EuiSkeleton children passed to the loadingContent should not have their own isLoading props or children.

Loading...

Customizing screen reader announcements

EuiSkeleton components assume that the page starts as loading and transitions to loaded, and the default screen reader experience is set up accordingly (announceLoadedStatus={true}).

In scenarios where that is not the case (i.e., transitioning to loading), you can customize what statuses are announced to screen readers by setting announceLoadingStatus to true, or announceLoadedStatus to false. Submitting the below example announces a loading status, but not a loaded status.

As an optional escape hatch, ariaLiveProps is also available and accepts any

EuiScreenReaderLive props.

Loading...

Props

EuiSkeletonCircle

Extends HTMLAttributes
𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
className#
↦
Description and type
Type: string
↦
Default value
↵
Prop
aria-label#
↦
Description and type

Defines a string value that labels the current element.
@see aria-labelledby.

Type: string
↦
Default value
↵
Prop
data-test-subj#
↦
Description and type
Type: string
↦
Default value
↵
Prop
css#
↦
Description and type
Type: Interpolation<Theme>
↦
Default value
↵
Prop
isLoading#
↦
Description and type

When true, shows the loading skeleton component.
When false, shows any children and announces to screen readers that your content has loaded.

Type: boolean
↦
Default value
true
↵
Prop
contentAriaLabel#
↦
Description and type

Label your loading sections to provide more helpful context to screen readers.
For example, pass "API keys" to have screen readers read "Loading API keys" and "Loaded API keys".

Type: string
↦
Default value
↵
Prop
announceLoadingStatus#
↦
Description and type

Makes a live screen reader announcement when isLoading is true

Type: boolean
↦
Default value
false
↵
Prop
announceLoadedStatus#
↦
Description and type

Makes a live screen reader announcement when isLoading is false

Type: boolean
↦
Default value
true
↵
Prop
ariaLiveProps#
↦
Description and type

Optional props to pass to the aria-live region that announces the loading status to screen readers.
Accepts any EuiScreenReaderLive props.

Type: Partial<EuiScreenReaderLiveProps>
↦
Default value
↵
Prop
ariaWrapperProps#
↦
Description and type

Optional props to pass to the aria-busy wrapper around the skeleton content

Type: HTMLAttributes<HTMLDivElement>
↦
Default value
↵
Prop
size#
↦
Description and type
Type: "s" | "m" | "l" | "xl"
↦
Default value
m
↵
𐘂𐘂

EuiSkeletonRectangle

Extends HTMLAttributes
𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
className#
↦
Description and type
Type: string
↦
Default value
↵
Prop
aria-label#
↦
Description and type

Defines a string value that labels the current element.
@see aria-labelledby.

Type: string
↦
Default value
↵
Prop
data-test-subj#
↦
Description and type
Type: string
↦
Default value
↵
Prop
css#
↦
Description and type
Type: Interpolation<Theme>
↦
Default value
↵
Prop
isLoading#
↦
Description and type

When true, shows the loading skeleton component.
When false, shows any children and announces to screen readers that your content has loaded.

Type: boolean
↦
Default value
true
↵
Prop
contentAriaLabel#
↦
Description and type

Label your loading sections to provide more helpful context to screen readers.
For example, pass "API keys" to have screen readers read "Loading API keys" and "Loaded API keys".

Type: string
↦
Default value
↵
Prop
announceLoadingStatus#
↦
Description and type

Makes a live screen reader announcement when isLoading is true

Type: boolean
↦
Default value
false
↵
Prop
announceLoadedStatus#
↦
Description and type

Makes a live screen reader announcement when isLoading is false

Type: boolean
↦
Default value
true
↵
Prop
ariaLiveProps#
↦
Description and type

Optional props to pass to the aria-live region that announces the loading status to screen readers.
Accepts any EuiScreenReaderLive props.

Type: Partial<EuiScreenReaderLiveProps>
↦
Default value
↵
Prop
ariaWrapperProps#
↦
Description and type

Optional props to pass to the aria-busy wrapper around the skeleton content

Type: HTMLAttributes<HTMLDivElement>
↦
Default value
↵
Prop
width#
↦
Description and type
Type: string | number
↦
Default value
24px
↵
Prop
height#
↦
Description and type
Type: string | number
↦
Default value
24px
↵
Prop
borderRadius#
↦
Description and type
Type: "s" | "m" | "none"
↦
Default value
s
↵
𐘂𐘂

EuiSkeletonLoading

Extends HTMLAttributes
𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
loadingContent#
↦
Description and type

Content to display when loading

Type: ReactElement
↦
Default value
Required
↵
Prop
loadedContent#
↦
Description and type

Content to display when loaded

Type: any
↦
Default value
Required
↵
Prop
className#
↦
Description and type
Type: string
↦
Default value
↵
Prop
aria-label#
↦
Description and type

Defines a string value that labels the current element.
@see aria-labelledby.

Type: string
↦
Default value
↵
Prop
data-test-subj#
↦
Description and type
Type: string
↦
Default value
↵
Prop
css#
↦
Description and type
Type: Interpolation<Theme>
↦
Default value
↵
Prop
isLoading#
↦
Description and type

When true, shows the loading skeleton component.
When false, shows any children and announces to screen readers that your content has loaded.

Type: boolean
↦
Default value
true
↵
Prop
contentAriaLabel#
↦
Description and type

Label your loading sections to provide more helpful context to screen readers.
For example, pass "API keys" to have screen readers read "Loading API keys" and "Loaded API keys".

Type: string
↦
Default value
↵
Prop
announceLoadingStatus#
↦
Description and type

Makes a live screen reader announcement when isLoading is true

Type: boolean
↦
Default value
false
↵
Prop
announceLoadedStatus#
↦
Description and type

Makes a live screen reader announcement when isLoading is false

Type: boolean
↦
Default value
true
↵
Prop
ariaLiveProps#
↦
Description and type

Optional props to pass to the aria-live region that announces the loading status to screen readers.
Accepts any EuiScreenReaderLive props.

Type: Partial<EuiScreenReaderLiveProps>
↦
Default value
↵
𐘂𐘂

EuiSkeletonTitle

Extends HTMLAttributes
𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
className#
↦
Description and type
Type: string
↦
Default value
↵
Prop
aria-label#
↦
Description and type

Defines a string value that labels the current element.
@see aria-labelledby.

Type: string
↦
Default value
↵
Prop
data-test-subj#
↦
Description and type
Type: string
↦
Default value
↵
Prop
css#
↦
Description and type
Type: Interpolation<Theme>
↦
Default value
↵
Prop
isLoading#
↦
Description and type

When true, shows the loading skeleton component.
When false, shows any children and announces to screen readers that your content has loaded.

Type: boolean
↦
Default value
true
↵
Prop
contentAriaLabel#
↦
Description and type

Label your loading sections to provide more helpful context to screen readers.
For example, pass "API keys" to have screen readers read "Loading API keys" and "Loaded API keys".

Type: string
↦
Default value
↵
Prop
announceLoadingStatus#
↦
Description and type

Makes a live screen reader announcement when isLoading is true

Type: boolean
↦
Default value
false
↵
Prop
announceLoadedStatus#
↦
Description and type

Makes a live screen reader announcement when isLoading is false

Type: boolean
↦
Default value
true
↵
Prop
ariaLiveProps#
↦
Description and type

Optional props to pass to the aria-live region that announces the loading status to screen readers.
Accepts any EuiScreenReaderLive props.

Type: Partial<EuiScreenReaderLiveProps>
↦
Default value
↵
Prop
ariaWrapperProps#
↦
Description and type

Optional props to pass to the aria-busy wrapper around the skeleton content

Type: HTMLAttributes<HTMLDivElement>
↦
Default value
↵
Prop
size#
↦
Description and type

EuiTitle size to render

Type: "xs" | "s" | "m" | "l" | "xxxs" | "xxs"
↦
Default value
m
↵
𐘂𐘂

EuiSkeletonText

Extends HTMLAttributes
𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
className#
↦
Description and type
Type: string
↦
Default value
↵
Prop
aria-label#
↦
Description and type

Defines a string value that labels the current element.
@see aria-labelledby.

Type: string
↦
Default value
↵
Prop
data-test-subj#
↦
Description and type
Type: string
↦
Default value
↵
Prop
css#
↦
Description and type
Type: Interpolation<Theme>
↦
Default value
↵
Prop
isLoading#
↦
Description and type

When true, shows the loading skeleton component.
When false, shows any children and announces to screen readers that your content has loaded.

Type: boolean
↦
Default value
true
↵
Prop
contentAriaLabel#
↦
Description and type

Label your loading sections to provide more helpful context to screen readers.
For example, pass "API keys" to have screen readers read "Loading API keys" and "Loaded API keys".

Type: string
↦
Default value
↵
Prop
announceLoadingStatus#
↦
Description and type

Makes a live screen reader announcement when isLoading is true

Type: boolean
↦
Default value
false
↵
Prop
announceLoadedStatus#
↦
Description and type

Makes a live screen reader announcement when isLoading is false

Type: boolean
↦
Default value
true
↵
Prop
ariaLiveProps#
↦
Description and type

Optional props to pass to the aria-live region that announces the loading status to screen readers.
Accepts any EuiScreenReaderLive props.

Type: Partial<EuiScreenReaderLiveProps>
↦
Default value
↵
Prop
ariaWrapperProps#
↦
Description and type

Optional props to pass to the aria-busy wrapper around the skeleton content

Type: HTMLAttributes<HTMLDivElement>
↦
Default value
↵
Prop
lines#
↦
Description and type

Number of lines to display (between 1 to 10)

Type: 5 | 2 | 8 | 3 | 7 | 1 | 4 | 6 | 9 | 10
↦
Default value
3
↵
Prop
size#
↦
Description and type

EuiText size to render

Type: "xs" | "s" | "m" | "relative"
↦
Default value
m
↵
𐘂𐘂
Edit this page

Previous
Progress
Next
Stat
  • Text
  • Title
  • Circle
  • Rectangle
  • Combining multiple skeletons
  • Customizing screen reader announcements
  • Props
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with ❤ by Elastic