Skip to content
Browse documentation
whisk/ui

Sizes

Choose predictable dimensions with numeric, named, fractional, and viewport size tokens.

Size scale

Size tokens describe width, height, and dimensions using numeric, named, fractional, and viewport values. Prefer a named or numeric token when it expresses the intent; arbitrary CSS dimensions remain available when the token vocabulary cannot.

Numeric sizes

0

0rem

0.5

0.125rem

1

0.25rem

1.5

0.375rem

2

0.5rem

2.5

0.625rem

3

0.75rem

3.5

0.875rem

4

1rem

4.5

1.125rem

5

1.25rem

5.5

1.375rem

6

1.5rem

6.5

1.625rem

7

1.75rem

7.5

1.875rem

8

2rem

8.5

2.125rem

9

2.25rem

10

2.5rem

11

2.75rem

12

3rem

13

3.25rem

14

3.5rem

15

3.75rem

16

4rem

20

5rem

24

6rem

25

6.25rem

28

7rem

32

8rem

36

9rem

37.5

9.375rem

40

10rem

44

11rem

48

12rem

50

12.5rem

52

13rem

56

14rem

60

15rem

64

16rem

72

18rem

80

20rem

96

24rem

Named sizes

3xs

14rem

2xs

16rem

xs

20rem

sm

24rem

md

28rem

lg

32rem

xl

36rem

2xl

42rem

3xl

48rem

4xl

56rem

5xl

64rem

6xl

72rem

full

100%

min

min-content

max

max-content

fit

fit-content

prose

60ch

Fractional sizes

1/12

8.333333%

1/6

16.666667%

2/12

16.666667%

1/5

20%

1/4

25%

3/12

25%

1/3

33.333333%

2/6

33.333333%

4/12

33.333333%

2/5

40%

5/12

41.666667%

1/2

50%

3/6

50%

6/12

50%

7/12

58.333333%

3/5

60%

2/3

66.666667%

4/6

66.666667%

8/12

66.666667%

3/4

75%

9/12

75%

4/5

80%

10/12

83.333333%

5/6

83.333333%

11/12

91.666667%

Viewport sizes

vw

100vw

vh

100vh

dvw

100dvw

dvh

100dvh

svw

100svw

svh

100svh

lvw

100lvw

lvh

100lvh

Use size tokens

Use named sizes for shared constraints, fractional values for fluid layouts, and viewport values only when a surface genuinely follows the viewport. Use prose for long-form reading widths.

Readable content uses the available space without becoming too wide.

import { Box, Text } from "@smoothie-framework/whisk-react";

<Box width={{ base: "full", lg: "prose" }} minHeight={16} background="surface2" rounded="lg" padding={4}>
  <Text>Readable content uses the available space without becoming too wide.</Text>
</Box>

Sizing props

Dimension props accept size tokens. Wrap any of them in a responsive object or array when one component needs to adapt without duplicate markup.

PropTypeDefaultDescription
width / heightDimensionValueautoSet the main dimensions from the shared size vocabulary.
minWidth / minHeightDimensionValuenoneProtect a usable minimum size without hard-coding a pixel value.
maxWidth / maxHeightDimensionValuenoneConstrain content or surfaces to a readable, predictable maximum.