apps/shade/src/docs/primitives-guide.mdx
import { Meta } from '@storybook/addon-docs/blocks';
<Meta title="Primitives / Primitives Guide" /> <div className="sb-doc">StackInlineBoxContainerGridTextUse semantic gaps (gap="md"), not raw numbers (gap-4). Map: see Tokens / Spacing.
PageHeader. Building a list page? Use ListPage.<div> carrying only flex / grid / gap utilities — that's exactly what primitives replace.Full rules and decision flow: Layers. Agent rules: apps/shade/AGENTS.md.
A settings row — label and description on the left, control on the right:
import {Switch} from '@tryghost/shade/components';
import {Box, Inline, Stack, Text} from '@tryghost/shade/primitives';
<Box padding="lg" radius="md" className="border border-border-default">
<Inline align="center" gap="md" justify="between">
<Stack gap="xs">
<Text weight="semibold">Email notifications</Text>
<Text size="sm" tone="secondary">Get notified when your posts get engagement.</Text>
</Stack>
<Switch />
</Inline>
</Box>
Browse the sidebar for each primitive's props and live stories.
</div>