EQTY LabDocs

Sizing

Seven size steps shared by text lines and controls, and when to use each

View as Markdown

Overview

Use this page to pick a size for a part you build, so it lines up with Equality’s own. Equality sizes text lines and controls on one scale of seven steps: 16, 20, 24, 28, 36, 44 and 52. Each step is the height of a line of text or of a box. The four text styles are Tailwind text sizes, each on the step that is its line height. A text line follows its own size, and a row centres it among the controls beside it: a 24 section line sits in a 28 row with small buttons. Pick the step that fits what the part is. Give text lines and controls a step; icons have their own sizes.

Controls’ size names are the step they sit on (sm 28, md 36). Avatar, Badge, Icon, Switch, Checkbox and Timeline use their own size names.

The Scale

16

Caption

Small badge
20

Body

Badge
24

Section

28

Section row

36

Title

44
52
Logo
StepText lineControlRowAlso
16text-captionSmall badge
20text-bodyDefault badge
24text-sectionExtra small
28Small
36text-titleDefaultRegular
44LargeComfortable
52A large picture or mark

When to Use Each Step

16

Small supporting text, such as a timestamp or a hint under a field. A small badge, only where space is tight.

20

Running text and descriptions, and anything that sits in a line of text, such as a default badge.

24

A card or section title’s line. An extra-small control beside a field, such as the clear button inside a picker.

28

Small controls. A row holding a card or section title, centred, and the small buttons beside it.

36

Default controls. A row holding the page title, 30 on a 36 line, and the default controls beside it. Regular table rows.

44

Large controls. Comfortable table rows, for tables people read slowly or use mostly by touch.

52

A picture or mark you build that should stand out more than a large control, such as a logo.

Rows

A table row is 36, or 44 with density="comfortable". Text that wraps makes the row taller.

Building Your Own Component

Put a part you build yourself on a step, not a pixel value. The steps are options: the values Equality allows. The sizes chosen from them for controls and text are decisions. Read a decision where one fits:

  • A control takes its height from --eq-control-{xs,sm,md,lg}-height (24, 28, 36, 44), such as h-(--eq-control-md-height).
  • Text takes one of the four styles on the Typography page.
  • A picture or mark that isn’t a control, such as a logo or an icon in a circle, takes --eq-size-{3xs,2xs,xs,sm,md,lg,xl} (16 to 52), such as size-(--eq-size-sm).