Package org.patternfly.component.skeleton


package org.patternfly.component.skeleton
Provides the PatternFly skeleton component.

A skeleton is a placeholder for content that has not yet loaded. It provides a visual indication of where content will appear, improving perceived performance. Skeletons support configurable widths, heights, font sizes, and shapes (circle, square, or default rectangle).

Usage

import static org.patternfly.component.skeleton.Skeleton.skeleton;

Skeleton skeleton = skeleton()
        .screenReaderText("Loading contents");
Skeletons with custom widths and shapes:
import static org.patternfly.component.skeleton.Shape.circle;
import static org.patternfly.component.skeleton.Shape.square;
import static org.patternfly.component.skeleton.Skeleton.skeleton;

Skeleton circleSkeleton = skeleton()
        .shape(circle)
        .width("30%")
        .screenReaderText("Loading circle contents");
Skeleton squareSkeleton = skeleton()
        .shape(square)
        .width("30%")
        .screenReaderText("Loading square contents");
See Also:
  • Class
    Description
     
    A skeleton is a type of loading state that allows you to expose content incrementally.