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
.
|
|
|
---|---|---|
|
The appearance of the skeleton. |
|
|
|
|
|
The variant of the skeleton that will be displayed. |
|
The appearance of the skeleton. |
|
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",}}/>
Light
Interactive example
<ic-skeletonvariant="circle"appearance="light"></ic-skeleton><ic-typographyvariant="caption"><ic-skeletonvariant="text"appearance="light"></ic-skeleton></ic-typography><ic-skeletonappearance="light"></ic-skeleton>
<IcSkeletonvariant="circle"appearance="light"/><IcTypographyvariant="caption"><IcSkeletonvariant="text"appearance="light"/></IcTypography><IcSkeletonappearance="light"/>
Within IcCard component
Interactive example
Americano Order
<ic-cardheading="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>
<IcCardheading="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",}}/></IcCard>