File size: 964 Bytes
5c876be | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | // βββ Spacing scale (4 dp grid) ββββββββββββββββββββββββββββββββββββββββββββββββββ
// Every value is a multiple of 4 for pixel-perfect alignment on all screens.
export const spacing = {
/** 4 dp β hairline / micro-gap */
xs: 4,
/** 8 dp β compact padding */
sm: 8,
/** 12 dp β default inner padding */
md: 12,
/** 16 dp β standard section padding */
lg: 16,
/** 24 dp β card-level spacing */
xl: 24,
/** 32 dp β large gaps / page margins */
xxl: 32,
/** 48 dp β hero / full-section gaps */
xxxl: 48,
} as const;
/** Keys available in the spacing scale β useful for typed helper utilities */
export type SpacingKeys = keyof typeof spacing;
/**
* Helper: retrieve a spacing value by key.
* @example spacingValue('lg') // 16
*/
export function spacingValue(key: SpacingKeys): number {
return spacing[key];
}
|