Skeleton
Skeleton
Component demo
Interactive example
<ic-skeletonvariant="circle"></ic-skeleton><ic-typographyvariant="caption"><ic-skeletonvariant="text"></ic-skeleton></ic-typography><ic-skeleton></ic-skeleton>
Skeleton details
Props
All components also accept native properties supported by the DOM, such asclassName
and
style
.
|
|
|
|
|---|---|---|
|
|
Height of the skeleton. Accepts any valid CSS length (e.g. "24px", "2rem", "100%"). |
|
|
|
Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component. |
|
|
|
The variant of the skeleton that will be displayed. |
|
|
|
Width of the skeleton. Accepts any valid CSS length (e.g. "24px", "2rem", "100%"). |
|
|
Height of the skeleton. Accepts any valid CSS length (e.g. "24px", "2rem", "100%"). |
|
Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component. |
|
The variant of the skeleton that will be displayed. |
|
Width of the skeleton. Accepts any valid CSS length (e.g. "24px", "2rem", "100%"). |
Variants
Inherited size from child
Interactive example
<ic-skeleton><div class="child">Test text</div></ic-skeleton>
Set width and height with props
Interactive example
Height and width set
Height set
Width set
<ic-typographyvariant="h4"><h4>Height and width set</h4></ic-typography><ic-skeletonheight="12.5rem"width="25.125rem"></ic-skeleton><ic-typographyvariant="h4"><h4>Height set</h4></ic-typography><ic-skeletonheight="5rem"></ic-skeleton><ic-typographyvariant="h4"><h4>Width set</h4></ic-typography><ic-skeletonwidth="25.125rem"></ic-skeleton>
Set width and height with inline styling
CSS changes directly toSkeleton
must be applied with inline styling.
Interactive example
Height and width set with styles
Height set with styles
Width set with styles
<ic-typographyvariant="h4"><h4>Height and width set with styles</h4></ic-typography><ic-skeletonstyle="height:12.5rem;width:25.125rem"></ic-skeleton><ic-typographyvariant="h4"><h4>Height set with styles</h4></ic-typography><ic-skeletonstyle="height:5rem"></ic-skeleton><ic-typographyvariant="h4"><h4>Width set with styles</h4></ic-typography><ic-skeletonstyle="width:25.125rem"></ic-skeleton>
Theme
Interactive example
<ic-skeletonvariant="circle"theme="dark"></ic-skeleton><ic-typographyvariant="caption"><ic-skeletonvariant="text"theme="dark"></ic-skeleton></ic-typography><ic-skeletontheme="dark"></ic-skeleton>
Within IcCardVertical component
Interactive example
Americano Order
<ic-card-verticalheading="Americano Order"subheading="Name: Michael"><ic-skeletonslot="icon"variant="circle"style="height:var(--ic-space-xl);width:var(--ic-space-xl);"></ic-skeleton><ic-skeletonslot="heading"variant="rectangle"style="height:var(--ic-space-xl);width:10.625rem;"></ic-skeleton><ic-skeletonslot="subheading"variant="text"style="height:1.125rem;width:6.25rem;"></ic-skeleton><ic-skeletonslot="message"variant="rectangle"style="height:var(--ic-space-lg);width:18.75rem;"></ic-skeleton><ic-skeletonslot="interaction-controls"variant="rectangle"style="height:2.5rem;width:6.25rem;"></ic-skeleton><ic-skeletonslot="interaction-controls"variant="rectangle"style="height:2.5rem;width:6.25rem;"></ic-skeleton></ic-card-vertical>