4.65.5 • Published 10 days ago

@contentful/f36-skeleton v4.65.5

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

title: 'Skeleton' slug: /components/skeleton/ github: 'https://github.com/contentful/forma-36/tree/main/packages/components/skeleton' storybook: 'https://f36-storybook.contentful.com/?path=/story/components-skeleton--basic'

typescript: ./src/SkeletonBodyText/SkeletonBodyText.tsx,./src/SkeletonContainer/SkeletonContainer.tsx,./src/SkeletonDisplayText/SkeletonDisplayText.tsx,./src/SkeletonImage/SkeletonImage.tsx,./src/SkeletonRow/SkeletonRow.tsx

Skeleton is used to display a loading state in components.

Import

import { Skeleton } from '@contentful/f36-components';
// or
import { Skeleton } from '@contentful/f36-skeleton';

How to use Skeleton

  • Compound components of Skeleton are: Container, BodyText, DisplayText, Image, Row.
  • Use the Skeleton.Container to control color, background color, animation, opacity of the skeleton elements that are used inside.
  • Use the Skeleton.BodyText component to simulate bodies of text with multiple lines.
  • Use the Skeleton.DisplayText component to simulate headings, subheadings or titles.
  • Use the Skeleton.Image component to simulate images, illustrations, avatars or icons.
  • Use the Skeleton.Row component to simulate table rows. Only use this component as a child of the TableBody component. The Skeleton.Row component renders <tr> tags, and this HTML tag should always be a child of a <tbody> tag.
    • Pass a value to the columnCount prop equal to the number of columns in your table (default value is 5).
    • Pass a value to the rowCount prop equal to the number of rows you need.
    • We think that for a better experience this value should match the number of rows that this table usually has when it's first loaded.

Examples

Basic usage

Different speed and color

Composition with different skeleton components

Setting image width and height

Pass some value to the width and height props to make the skeleton the same size as the simulated image (default values are 70). You can use the same values a normal <rect> tag would accept for width and height

Round image skeleton

Pass some value to the radiusX and radiusY props to control the roundness of skeleton's corners (default values are 0). You can use the same values a normal <rect> tag would accept for rx and ry

Table rows

Usage without compound components

Props (API reference)

Skeleton.Container

Skeleton.BodyText

Skeleton.DisplayText

Skeleton.Image

Skeleton.Row

4.65.5

10 days ago

4.65.4

12 days ago

4.65.3

13 days ago

4.65.2

13 days ago

4.65.1

16 days ago

4.65.0

19 days ago

4.63.0

1 month ago

4.64.0

1 month ago

4.62.0

1 month ago

4.61.0

2 months ago

4.60.3

2 months ago

4.60.2

3 months ago

4.60.1

3 months ago

4.60.0

3 months ago

4.59.3

3 months ago

4.59.2

3 months ago

4.59.1

3 months ago

4.59.0

3 months ago

4.58.4

4 months ago

4.58.3

4 months ago

4.58.2

4 months ago

4.58.1

4 months ago

4.58.0

4 months ago

4.57.0

4 months ago

4.56.1

5 months ago

4.56.2

5 months ago

4.56.0

5 months ago

4.55.1

5 months ago

4.55.0

5 months ago

4.54.5

5 months ago

4.54.4

5 months ago

4.49.1

9 months ago

4.49.0

9 months ago

4.52.1

8 months ago

4.52.2

7 months ago

4.52.0

8 months ago

4.52.3

7 months ago

4.47.0

10 months ago

4.48.2

9 months ago

4.48.1

9 months ago

4.48.0

10 months ago

4.51.0

8 months ago

4.54.0

6 months ago

4.54.3

6 months ago

4.54.1

6 months ago

4.54.2

6 months ago

4.53.0

7 months ago

4.46.0

10 months ago

4.47.3

10 months ago

4.47.2

10 months ago

4.47.1

10 months ago

4.50.0

9 months ago

4.50.1

8 months ago

4.50.2

8 months ago

4.45.0

11 months ago

4.44.0

11 months ago

4.37.1

1 year ago

4.37.0

1 year ago

4.40.3

12 months ago

4.40.2

12 months ago

4.40.1

12 months ago

4.40.0

12 months ago

4.40.7

12 months ago

4.40.6

12 months ago

4.40.5

12 months ago

4.40.4

12 months ago

4.36.0

1 year ago

4.39.0

1 year ago

4.42.0

11 months ago

4.38.1

1 year ago

4.38.0

1 year ago

4.41.1

12 months ago

4.41.0

12 months ago

4.43.0

11 months ago

4.35.0

1 year ago

4.31.0

1 year ago

4.30.2

1 year ago

4.30.1

1 year ago

4.30.0

1 year ago

4.30.3

1 year ago

4.33.0

1 year ago

4.29.0

1 year ago

4.32.0

1 year ago

4.34.1

1 year ago

4.34.0

1 year ago

4.28.0

1 year ago

4.27.0

1 year ago

4.25.0

1 year ago

4.26.0

1 year ago

4.24.1

1 year ago

4.25.1

1 year ago

4.25.2

1 year ago

4.24.0

1 year ago

4.21.4

2 years ago

4.21.5

2 years ago

4.21.6

1 year ago

4.21.7

1 year ago

4.21.8

1 year ago

4.23.0

1 year ago

4.23.1

1 year ago

4.23.2

1 year ago

4.22.0

1 year ago

4.23.3

1 year ago

5.0.0

2 years ago

4.21.1

2 years ago

4.21.2

2 years ago

4.21.3

2 years ago

4.21.0

2 years ago

4.20.9

2 years ago

4.16.0

2 years ago

4.20.6

2 years ago

4.20.7

2 years ago

4.20.8

2 years ago

4.15.1

2 years ago

4.18.0

2 years ago

4.17.0

2 years ago

4.20.2

2 years ago

4.20.3

2 years ago

4.20.4

2 years ago

4.20.5

2 years ago

4.20.0

2 years ago

4.20.1

2 years ago

4.19.0

2 years ago

4.19.1

2 years ago

4.19.2

2 years ago

4.15.0

2 years ago

4.14.0

2 years ago

4.13.0

2 years ago

4.11.0-beta.0

2 years ago

4.10.5

2 years ago

4.10.1

2 years ago

4.10.2

2 years ago

4.10.3

2 years ago

4.10.4

2 years ago

4.12.0

2 years ago

4.11.0

2 years ago

4.10.0

2 years ago

4.9.0

2 years ago

4.8.1

2 years ago

4.8.2

2 years ago

4.4.1

2 years ago

4.8.0

2 years ago

4.7.0

2 years ago

4.7.1

2 years ago

4.6.1

2 years ago

4.6.0

2 years ago

4.6.2

2 years ago

4.5.0

2 years ago

4.4.0

2 years ago

4.3.11

2 years ago

4.3.10

2 years ago

4.3.9

2 years ago

4.1.6

2 years ago

4.1.4

2 years ago

4.1.3

2 years ago

4.1.5

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.1-beta.2705

2 years ago

4.0.1-beta.2590

2 years ago

4.0.1-beta.2595

2 years ago

4.0.1-beta.2696

2 years ago

4.0.1-beta.2694

2 years ago

4.1.0

2 years ago

4.1.2

2 years ago

4.1.1

2 years ago

4.0.1-beta.2555

2 years ago

4.0.1-beta.2550

2 years ago

4.0.1-beta.2558

2 years ago

4.0.1-beta.2543

2 years ago

4.0.1-beta.2542

2 years ago

4.0.1-beta.2540

2 years ago

4.0.1-beta.2534

2 years ago

4.0.1-beta.2533

2 years ago

4.0.1-beta.2530

2 years ago

4.0.1-beta.2531

2 years ago

4.0.1-beta.2496

3 years ago

4.0.1-beta.2538

2 years ago

4.0.1-beta.2539

2 years ago

4.0.1-beta.2536

2 years ago

4.0.1-beta.2524

2 years ago

4.0.1-beta.2522

2 years ago

4.0.1-beta.2529

2 years ago

4.0.1-beta.2527

2 years ago

4.0.1-beta.2515

3 years ago

4.0.1-beta.2500

3 years ago

4.0.1-beta.2505

3 years ago

4.0.1-beta.2506

3 years ago

4.0.1-beta.2482

3 years ago

4.0.1-beta.2483

3 years ago

4.0.1-beta.2489

3 years ago

4.0.1-beta1.2482

3 years ago