Foundation
Spacing
Space tokens for layout gaps and padding
Overview
Space tokens for consistent spacing. Use these tokens for all gap, padding, and margin values.
Space Scale
18 tokens
| Token | Value |
|---|---|
Usage
import { Box, Stack, Text } from '@illog/ui'
import { tokens } from '@illog/themes'
// Token values are in the table above
export const sectionGap = tokens.size.space[400]
export function Spaced() {
return (
<Stack gap="300">
<Box p="400">
<Text>Padding 400</Text>
</Box>
<Box p="200">
<Text>Padding 200</Text>
</Box>
</Stack>
)
}Guidelines
- Based on a 4px unit grid (2, 4, 6, 8, 12, 16, ...)
- Use
100–300for internal component padding - Use
300–500for spacing between components - Use
600or above for spacing between sections