Skeleton
Loading placeholder
import { Skeleton } from '@ensdomains/thorin'
<DeleteMe> <Skeleton loading={getState('skeleton')}>Hello World</Skeleton> <VisuallyHidden>{setDefaultState('skeleton', true)}</VisuallyHidden> <Button onClick={() => toggleState('skeleton')}>Toggle</Button> </DeleteMe>
name | type | default | description |
---|---|---|---|
as | "span" | - | An alternative element type to render the component as. |
loading | boolean | - | If true, hides the content and shows the skeleton style. |
The container will automatically resize to encompass wrapped content.
Nest inside SkeletonGroup
to manage multiple skeletons with a single loading
prop.