MazSkeleton
MazSkeleton is a standalone component to display loading placeholders with animated shimmer effect
Before use it, you should install the MazUi plugin in your project, follow instructions in Getting Started
TIP
This component can be translated globally using the MazUi plugin.
Basic usage
The skeleton displays a loading placeholder with a shimmer animation by default.
Shapes
Use the shape prop to change the skeleton shape: rectangle (default), circle, or square.
Sizes
Use the size prop to set both width and height (for circle and square shapes), or use width and height props for more control.
Custom dimensions
For rectangles, use width and height props for precise control.
Rounded sizes
Control the border radius using the rounded-size prop.
Disable animation
Use the animated prop set to false to disable the shimmer animation.
Card skeleton example
Combine multiple skeletons to create loading placeholders for complex layouts.
Article skeleton example
Create an article loading placeholder with various skeleton elements.
List skeleton example
Create a list loading placeholder.
Accessibility
The component includes proper accessibility attributes:
role="status"to indicate loading statearia-live="polite"for screen reader announcements- Customizable
aria-labelandloading-textprops
Props
| Name | Description | Type | Required | Default | Possible values |
|---|---|---|---|---|---|
| shape | Skeleton shape type | 'circle' | 'rectangle' | 'square' | No | rectangle | circle, rectangle, square |
| size | Size with units (ex: '2rem', '40px', '3em') | SizeUnit | No | 1rem | - |
| width | Custom width | SizeUnit | No | undefined | - |
| height | Custom height | SizeUnit | No | undefined | - |
| animated | Disable animation | boolean | No | true | - |
| rounded-size | Controls the border radius | 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full' | No | md | none, sm, md, lg, xl, full |
| aria-label | Accessibility label | string | No | skeleton.ariaLabel' (translations) | - |
| loading-text | Loading text for accessibility | string | No | skeleton.loadingText' (translations) | - |