Spacing
Shavin has no spacing scale of its own. It uses Tailwind's default: one step is 0.25rem, 4px at a 16px root font size, so p-4 is 16px and gap-6 is 24px. Components expose a few named steps from that scale as props.
Scale
A selection of steps. The full scale runs to 96 (24rem).
0
0rem / 0px
0.5
0.125rem / 2px
1
0.25rem / 4px
1.5
0.375rem / 6px
2
0.5rem / 8px
2.5
0.625rem / 10px
3
0.75rem / 12px
4
1rem / 16px
5
1.25rem / 20px
6
1.5rem / 24px
8
2rem / 32px
10
2.5rem / 40px
12
3rem / 48px
16
4rem / 64px
20
5rem / 80px
24
6rem / 96px
32
8rem / 128px
40
10rem / 160px
48
12rem / 192px
64
16rem / 256px
Gap
gap-1
gap-2
gap-4
gap-6
gap-8
Padding
p-1
p-2
p-4
p-6
p-8
Card padding
Card takes a padding prop. It has no padding by default.
| padding | Class | Size |
|---|---|---|
none | None | 0 (default) |
xs | p-2 | 8px |
sm | p-4 | 16px |
md | p-5 | 20px |
lg | p-6 | 24px |
xl | p-8 | 32px |
2xl | p-10 | 40px |
3xl | p-12 | 48px |
padding="sm"
16px
padding="md"
20px
padding="lg"
24px
padding="xl"
32px
Flex and Grid gap
Flex and Grid share this gap map. From step 5 the prop no longer matches the Tailwind number: gap="5" is gap-6.
| gap | Class | Size |
|---|---|---|
0 | gap-0 | 0 |
1 | gap-1 | 4px |
2 | gap-2 | 8px |
3 | gap-3 | 12px (Flex default) |
4 | gap-4 | 16px (Grid default) |
5 | gap-6 | 24px |
6 | gap-8 | 32px |
7 | gap-12 | 48px |