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>
<IcSkeletonvariant="circle"/><IcTypographyvariant="caption"><IcSkeletonvariant="text"/></IcTypography><IcSkeleton/>
Skeleton details
Props
All components also accept native properties supported by the DOM, such asclassName
and
style
.
|
|
|
---|---|---|
|
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. |
|
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. |
Variants
Inherited size from child
Interactive example
<ic-skeleton><div class="child">Test text</div></ic-skeleton>
<IcSkeleton><divclassName={classes.child}>Test text</div></IcSkeleton>
Set width and height
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:28.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:28.125rem"></ic-skeleton>
<IcTypographyvariant="h4"><h4>Height and width set with styles</h4></IcTypography><IcSkeletonstyle={{ height:"12.5rem", width:"12.5rem",}}/><IcTypographyvariant="h4"><h4>Height set with styles</h4></IcTypography><IcSkeletonstyle={{ height:"5rem",}}/><IcTypographyvariant="h4"><h4>Width set with styles</h4></IcTypography><IcSkeletonstyle={{ width:"28.125rem",}}/>
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>
<IcSkeletonvariant="circle"theme="dark"/><IcTypographyvariant="caption"><IcSkeletonvariant="text"theme="dark"/></IcTypography><IcSkeletontheme="dark"/>
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>
<IcCardVerticalheading="Americano Order"subheading="Name: Michael"><IcSkeletonslot="icon"variant="circle"style={{ height:"var(--ic-space-xl)", width:"var(--ic-space-xl)",}}/><IcSkeletonslot="heading"variant="rectangle"style={{ height:"var(--ic-space-xl)", width:"10.625rem",}}/><IcSkeletonslot="subheading"variant="text"style={{ height:"1.125rem", width:"6.25rem",}}/><IcSkeletonslot="message"variant="rectangle"style={{ height:"var(--ic-space-lg)", width:"18.75rem",}}/><IcSkeletonslot="interaction-controls"variant="rectangle"style={{ height:"2.5rem", width:"6.25rem",}}/><IcSkeletonslot="interaction-controls"variant="rectangle"style={{ height:"2.5rem", width:"6.25rem",}}/></IcCardVertical>