diff --git a/docs/contributor-docs/v10-upgrade-guide.md b/docs/contributor-docs/v10-upgrade-guide.md index 2f9590c4d2..085a462f05 100644 --- a/docs/contributor-docs/v10-upgrade-guide.md +++ b/docs/contributor-docs/v10-upgrade-guide.md @@ -1,7 +1,7 @@ --- title: Upgrade Guide for Version 10.0 category: Guides -order: 7 +order: 98 --- # Upgrade Guide for Version 10 diff --git a/docs/guides/layout-spacing.md b/docs/guides/layout-spacing.md new file mode 100644 index 0000000000..93a928bc53 --- /dev/null +++ b/docs/guides/layout-spacing.md @@ -0,0 +1,92 @@ +--- +title: Layout Spacing +category: Guides +order: 8 +--- + +# Layout Spacing + +Our design system provides a set of spacing tokens for consistent layouts and components. Some tokens share values but should be used semantically. For instance, while both `space12` and `buttons` are 12px, `buttons` should be used for spacing between buttons. + +## Tokens + +| Key | Value | +|--------------------|--------| +| space0 | 0px | +| space2 | 2px | +| space4 | 4px | +| space8 | 8px | +| space12 | 12px | +| space16 | 16px | +| space24 | 24px | +| space36 | 36px | +| space48 | 48px | +| space60 | 60px | +| sections | 36px | +| sectionElements | 24px | +| trayElements | 24px | +| modalElements | 24px | +| moduleElements | 16px | +| paddingCardLarge | 24px | +| paddingCardMedium | 16px | +| paddingCardSmall | 12px | +| selects | 16px | +| textAreas | 16px | +| inputFields | 16px | +| checkboxes | 16px | +| radios | 16px | +| toggles | 16px | +| buttons | 12px | +| tags | 12px | +| statusIndicators | 12px | +| dataPoints | 12px | + +## Applying Spacing + +There are three main ways to apply spacing in our component library: + +### 1. Using the `margin` Prop + +Most components in the library support a `margin` prop that works similarly to the CSS margin property. You can specify a single value or fine-tune individual margins (e.g., top, right, bottom, left). + +```ts +--- +type: example +--- +