Skeleton
Description
A placeholder component for loading state
Skeleton loaders are used to provide a placeholder for content that is still loading. They help reduce the perceived load time and prevent layout shifts by reserving the space that the final content will occupy.
They come in various shapes like circles for avatars and rectangles for text or images.
Samples
Avatar and Text Placeholder
Article/Image Placeholder
API reference
public enum SkeletonTypePredefined shape presets used by the Skeleton placeholder.
- Namespace
- Tesserae
public sealed class Skeleton : ComponentBase<Skeleton, HTMLElement>- Namespace
- Tesserae
- Inheritance
- ComponentBase<Skeleton, HTMLElement> → Skeleton
Constructors
| Name | Description |
|---|---|
| Skeleton | Initializes a new instance of this class. |
Properties
| Name | Description |
|---|---|
| TypeValue | Gets or sets the type value. |
| IsAnimated | Returns a value indicating whether the component is animated. |
Methods
| Name | Description |
|---|---|
| Type | Configures the component to type. |
| Animated | Configures the component to animated. |
| AI | Tints the placeholder with the AI gradient, and recolours the shimmer to match: this is content being generated rather than content being fetched. Same shape, same animation, same speed - only the colour says what is being waited for. |
| Background | Gets or sets the CSS background of the component. |
| Render | Renders the component's root HTML element. |
public Skeleton Animated(bool value = true)Configures the component to animated.
public Skeleton AI(bool value = true)Tints the placeholder with the AI gradient, and recolours the shimmer to match: this is content being generated rather than content being fetched. Same shape, same animation, same speed - only the colour says what is being waited for.
public Skeleton Background(string color)Gets or sets the CSS background of the component.