Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/add-new-component/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ export const playground = {
type: 'playground',
controls: {
variant: { type: 'select', options: ['solid', 'outline'], defaultValue: 'solid' },
size: { type: 'select', options: ['small', 'normal'], defaultValue: 'normal' },
size: { type: 'select', options: ['small', 'medium'], defaultValue: 'medium' },
disabled: { type: 'checkbox', defaultValue: false },
children: { type: 'text', initialValue: 'Click me' }
},
Expand Down
8 changes: 4 additions & 4 deletions apps/www/src/components/dataview-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ function SelectionBar() {
<FloatingActions aria-label='Selection actions'>
<Chip
variant='outline'
size='large'
size='small'
color='neutral'
leadingIcon={<Frame size={16} strokeWidth={1.5} />}
>
Expand Down Expand Up @@ -895,16 +895,16 @@ function TaskCard({
{task.title}
</Text>
<Flex align='center' gap={2}>
<Badge size='micro' color={TASK_STATUS_BADGE[task.status]}>
<Badge size='mini' color={TASK_STATUS_BADGE[task.status]}>
{task.status}
</Badge>
<DataView.DisplayAccess accessorKey='team'>
<Badge size='micro' color='neutral'>
<Badge size='mini' color='neutral'>
{task.team}
</Badge>
</DataView.DisplayAccess>
<DataView.DisplayAccess accessorKey='priority'>
<Badge size='micro' color='neutral'>
<Badge size='mini' color='neutral'>
{task.priority}
</Badge>
</DataView.DisplayAccess>
Expand Down
4 changes: 2 additions & 2 deletions apps/www/src/components/docs/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function DocsFooter({ url }: DocsFooterProps) {
<Button
variant='outline'
color='neutral'
size='normal'
size='medium'
leadingIcon={<ArrowLeft size={16} strokeWidth={1.5} />}
>
{neighbours.previous.name}
Expand All @@ -30,7 +30,7 @@ export default function DocsFooter({ url }: DocsFooterProps) {
<Button
variant='outline'
color='neutral'
size='normal'
size='medium'
trailingIcon={<ArrowRight size={16} strokeWidth={1.5} />}
>
{neighbours.next.name}
Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/components/tag/tag.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
padding-left: 8px;
padding-right: 8px;
}
.tag.regular {
.tag.medium {
border-radius: 28px;
padding-left: 12px;
padding-right: 12px;
Expand Down
4 changes: 2 additions & 2 deletions apps/www/src/components/tag/tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import styles from './tag.module.css';

interface TagProps {
value: TagType;
size?: 'small' | 'regular';
size?: 'small' | 'medium';
}

export default function Tag({ value, size = 'small' }: TagProps) {
if (!value.length) return;
return (
<Badge
screenReaderText={value}
size={size === 'regular' ? 'regular' : 'micro'}
size={size === 'medium' ? 'medium' : 'mini'}
color={value === 'beta' ? 'neutral' : 'gradient'}
className={cx(styles.tag, styles[size])}
>
Expand Down
45 changes: 45 additions & 0 deletions apps/www/src/content/docs/(overview)/upgrading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,51 @@ These filters used to match by mistake, and now match differently:
`'2026/1/1T10:30'`, used to be read. It now matches only `neq`, and the
timeline does not draw it. Store such dates as ISO 8601 (`2026-01-01T10:30`).

## Unreleased: one size name per control height

Controls share one set of size names. From smallest to largest, the names are
`micro`, `mini`, `small`, `medium` and `large`. The 32px input and button size
is `medium` everywhere. The pixel sizes do not change, and each component keeps
its default size, so only code that passes an old value needs a change.

| Component | Before | After |
|---|---|---|
| `Button` | `size="normal"` (default) | `size="medium"` (default) |
| `Input`, `TextArea`, `Search`, `Combobox.Input`, `Command.Input` | `size="large"` (default) | `size="medium"` (default) |
| `Checkbox`, `Radio`, `Radio.Group`, `Switch` | `size="large"` (default) | `size="medium"` (default) |
| `Badge` | `size="micro"` | `size="mini"` |
| `Badge` | `size="regular"` | `size="medium"` |
| `Tabs` | `size="small"` | `size="mini"` |
| `Tabs` | `size="medium"` (default) | `size="small"` (default) |
| `Tabs` | `size="large"` | `size="medium"` |
| `Chip` | `size="small"` (default) | `size="mini"` (default) |
| `Chip` | `size="large"` | `size="small"` |

TypeScript reports each old value, except on `Tabs` and `Chip`. `Tabs` still
accepts `small` and `medium`, and `Chip` still accepts `small`, but each one now
renders the next size up, so check every `Tabs` and `Chip` `size`. On the other
components, `small` keeps its name, and `small` is still the `Badge` default.

### Separator `size` becomes `variant`

| Before | After |
|---|---|
| `size="full"` (default) | `variant="full"` (default) |
| `size="half"` | `variant="middle"` |
| `size="small"` | `variant="middle"`, or set the length with a class |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: I think "set the length with a class" won't work as written.
The variant rules are .variant-middle[data-orientation="vertical"] (a class plus an attribute), so a single consumer class loses whatever the load order.
middle also adds insets and sizes from the parent, while small was a fixed 20px line. variant="full" with an inline length gives the old result exactly.

Suggested change
| `size="small"` | `variant="middle"`, or set the length with a class |
| `size="small"` | `variant="full"` with `style={{ width: 20 }}`, or `height` on a vertical line |


`middle` insets both ends of the line from the container edges: 16px on a
horizontal line and 8px on a vertical line. The line is centered. `half` was
50% of the container and `small` was 20px, so check the lines that used them.

```tsx
// Before
<Separator size="half" />

// After
<Separator variant="middle" />
```

## Unreleased: one-off props

Some props that only one component had are removed or renamed to the names
Expand Down
4 changes: 2 additions & 2 deletions apps/www/src/content/docs/ai-elements/prompt-input/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export const editorCapabilitiesDemo = {
type: 'user',
group: 'Users',
leadingIcon: <Avatar size={1} fallback="A" />,
trailingIcon: <Badge size="micro" color="neutral">Agent</Badge>
trailingIcon: <Badge size="mini" color="neutral">Agent</Badge>
},
{
id: 'u3',
Expand Down Expand Up @@ -309,7 +309,7 @@ export const mentionsDemo = {
label: 'Apsara Assistant',
type: 'user',
group: 'Users',
trailingIcon: <Badge size="micro" color="neutral">Agent</Badge>
trailingIcon: <Badge size="mini" color="neutral">Agent</Badge>
},
{ id: 'u3', label: 'Dana Whitfield', type: 'user', group: 'Users' }
];
Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/content/docs/components/badge/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const playground = {
},
size: {
type: 'select',
options: ['micro', 'small', 'regular'],
options: ['mini', 'small', 'medium'],
defaultValue: 'small'
},
leadingIcon: {
Expand Down Expand Up @@ -59,9 +59,9 @@ export const sizesDemo = {
type: 'code',
code: `
<Flex gap={5} align="center">
<Badge size="micro">Micro</Badge>
<Badge size="mini">Mini</Badge>
<Badge size="small">Small</Badge>
<Badge size="regular">Regular</Badge>
<Badge size="medium">Medium</Badge>
</Flex>`
};

Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/content/docs/components/badge/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Set the color of the badge, how big it is, and whether it carries an icon.

### Size

Three sizes. `small` is the default. `regular` matches body text and suits badges that stand alone, for example beside a heading. `micro` fits inside table rows and beside dense labels.
Three sizes. `small` is the default. `medium` matches body text and suits badges that stand alone, for example beside a heading. `mini` fits inside table rows and beside dense labels.

<Demo data={sizesDemo} />

Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/content/docs/components/badge/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface BadgeProps {
* Size of the badge
* @defaultValue "small"
*/
size?: 'micro' | 'small' | 'regular';
size?: 'mini' | 'small' | 'medium';

/** Optional ReactNode to display an icon before the text */
leadingIcon?: React.ReactNode;
Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/content/docs/components/button/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const playground = {
},
size: {
type: 'select',
options: ['small', 'normal'],
defaultValue: 'normal'
options: ['small', 'medium'],
defaultValue: 'medium'
},
leadingIcon: { type: 'icon' },
trailingIcon: { type: 'icon' },
Expand Down Expand Up @@ -96,7 +96,7 @@ export const sizesDemo = {
type: 'code',
code: `<Flex gap={9} align="center">
<Button size="small">Small</Button>
<Button size="normal">Normal</Button>
<Button size="medium">Medium</Button>
</Flex>`
};
export const disabledDemo = {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/content/docs/components/button/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Color carries meaning, not decoration. `danger` for destructive actions, `succes

### Size

Two sizes. `normal` is the default and fits most layouts. Use `small` inside toolbars, table rows, and other dense surfaces.
Two sizes. `medium` is the default and fits most layouts. Use `small` inside toolbars, table rows, and other dense surfaces.

<Demo data={sizesDemo} />

Expand Down
8 changes: 4 additions & 4 deletions apps/www/src/content/docs/components/checkbox/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export const playground = {
},
size: {
type: 'select',
options: ['large', 'small'],
defaultValue: 'large'
options: ['medium', 'small'],
defaultValue: 'medium'
}
},
getCode
Expand Down Expand Up @@ -62,8 +62,8 @@ export const sizeExamples = {
type: 'code',
tabs: [
{
name: 'Large (default)',
code: `<Checkbox size="large" />`
name: 'Medium (default)',
code: `<Checkbox size="medium" />`
},
{
name: 'Small',
Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/content/docs/components/checkbox/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ A checkbox on its own, then in a group, where a parent can both reflect and driv

### Size variants

Two sizes. `large` is the default; `small` fits table rows and dense lists.
Two sizes. `medium` is the default; `small` fits table rows and dense lists.

<Demo data={sizeExamples} />

Expand Down
4 changes: 2 additions & 2 deletions apps/www/src/content/docs/components/checkbox/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export interface CheckboxProps {

/**
* The size of the checkbox.
* @defaultValue 'large'
* @defaultValue 'medium'
*/
size?: 'small' | 'large';
size?: 'small' | 'medium';

/**
* Custom render function for the indicator. Receives `(props, state)` where state includes `checked` and `indeterminate`.
Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/content/docs/components/chip/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const playground = {
},
size: {
type: 'select',
options: ['small', 'large'],
defaultValue: 'small'
options: ['mini', 'small'],
defaultValue: 'mini'
},
color: {
type: 'select',
Expand Down Expand Up @@ -55,8 +55,8 @@ export const sizesDemo = {
type: 'code',
code: `
<Flex gap={9}>
<Chip size="mini">Mini</Chip>
<Chip size="small">Small</Chip>
<Chip size="large">Large</Chip>
</Flex>`
};

Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/content/docs/components/chip/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ Choose between `outline` and `solid` variants. `solid` fills the chip with the b

### Size

Two sizes. `large` is the default; `small` fits inside inputs and table cells.
Two sizes. `mini` is the default and fits inside inputs and table cells.

- `small`: Compact size with less padding
- `large`: More spacious with increased padding
- `mini`: Compact size with less padding
- `small`: More spacious with increased padding

<Demo data={sizesDemo} />

Expand Down
4 changes: 2 additions & 2 deletions apps/www/src/content/docs/components/chip/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export interface ChipProps {

/**
* Size of the chip
* @defaultValue "small"
* @defaultValue "mini"
*/
size?: 'small' | 'large';
size?: 'mini' | 'small';

/**
* Color style. `danger`, `success` and `attention` convey status.
Expand Down
4 changes: 2 additions & 2 deletions apps/www/src/content/docs/components/combobox/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const playground = {
label: { type: 'text', initialValue: 'Fruits' },
size: {
type: 'select',
options: ['small', 'large'],
defaultValue: 'large'
options: ['small', 'medium'],
defaultValue: 'medium'
},
multiple: {
type: 'checkbox',
Expand Down
4 changes: 2 additions & 2 deletions apps/www/src/content/docs/components/combobox/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ export interface ComboboxRootProps {
export interface ComboboxInputProps {
/**
* Size variant of the input field.
* @default "large"
* @default "medium"
*/
size?: 'small' | 'large';
size?: 'small' | 'medium';

/** Whether the input is disabled. */
disabled?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions apps/www/src/content/docs/components/command/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export interface CommandInputProps {

/**
* Size variant of the input field.
* @defaultValue "large"
* @defaultValue "medium"
*/
size?: 'small' | 'large';
size?: 'small' | 'medium';

/** Additional CSS class names. */
className?: string;
Expand Down
Loading
Loading