Skip to main content

Spacing

Space Scale

Spacing values are derived from a 10-step scale, which is used for props like margin, padding, and gap. The scale is based on powers of two, which allows for a consistent and predictable spacing system.

0
1
2
3
4
5
6
7
8
9
ScaleSpacing
00
14px
28px
312px
416px
524px
632px
740px
848px
964px

Customizing

Spacing is configured in the theme

import { createTheme, defaultTheme } from "@atomicjolt/atomic-elements";

const theme = createTheme({
variables: {
"space-0": "0",
"space-1": "0.25rem",
"space-2": "0.5rem",
"space-3": "1rem",
"space-4": "2rem",
"space-5": "4rem",
"space-6": "8rem",
"space-7": "16rem",
"space-8": "32rem",
"space-9": "64rem",
},
base: defaultTheme,
});