# Button changelog
Read the complete [LICENSE](https://snowui.dev/LICENSE) for the installed version before use.
Reviewed against Chinese source SHA-256 `226ea8b6314d1fc95c7490133d90aad85b5209b0fa2833c26797b6038fe4e6f2`. For version differences, check the installed package as well.
### v2.20.0 (2026-10-22)
- Internal content uses the shared minimum single-line spacing while preserving Hug sizing, size and padding, icon size, motion and events. Callers do not need an extra Frame.
- 2026-10-05: Changed the former Indigo default palette to Brand (`--brand`), retaining existing opacity, state, and override behavior.
### 2026-09-28
- Stabilized the built-in hover background composite layer to avoid rebuilding the layer and repainting the background on repeated pointer entry and exit; text scaling, ratios, color, and timing remain.
### v2.19.0 (2026-09-27)
- Added `contentScaleOnHover`: content scales as a whole with default background hover and click scaling, and can be disabled independently. Content does not scale when the background does not; layout and hit area stay fixed.
- Fixed a visual downward shift from text repaint at the end of hover scaling; sm / md / lg regressions compare pixels in the final animation frame with the settled frame.
- 2026-09-21: Aligned the usage guide, source Prop table, and Site / AI reading entry. Documentation only; component behavior is unchanged.
### v2.18.1 (2026-09-12)
- Capped total horizontal hover background expansion at 0.25rem while retaining the vertical ratio. Borderless hidden starting state and click shrink compensate by axis, so expansion no longer grows without bound with button width. Shared size observation is reused; content, layout, and timing remain.
### v2.18.0 (2026-09-04)
- Compensated md / lg hover endpoints, Borderless hidden starting points, and click midpoints inversely to standard height; default / sm appearance is unchanged. Retained proportional background transforms, colors, timing, content, and composition switches. Final appearance awaits Owner visual acceptance.
### 2026-09-03
- Added click shrink and recovery to built-in hover background enlargement, controlled together by `scaleOnHover`.
### v2.17.1 (2026-09-02)
- Expanded per-Prop descriptions, default fallbacks, and usage boundaries based on the current source. Runtime behavior is unchanged.
### v2.17.0 (2026-08-27)
- **BTN-Hover.14** Restored the background-layer ratio scheme approved by the Owner on 2026-08-19, replacing the current effect of BTN-Hover.9–13: gray / filled / outline use `1 → 1.06`; Borderless uses a hidden `0.84 → 1.06`; background transform uses `200ms ease`, color uses shared `150ms ease-out`. Content, hit area, layout, and composite-control disabling rules remain.
### v2.16.0 (2026-08-19)
- **BTN-Hover.13** Hover color opacity and background inset/radius now share `150ms ease-in-out`, starting and finishing together on entry and exit; final color and geometry endpoints remain.
### v2.15.0 (2026-08-19)
#### Motion stability
- **BTN-Hover.12** Frame-by-frame browser inspection of the real Test A2 sm `Small` filled Button confirmed stable root layout. Perceived jitter came from high-contrast edge repaint at subpixels under `200ms ease` and staggered geometry/color completion. Geometry changed to `150ms ease-in-out` to shorten repaint and soften entry/exit; color retained a gentle `300ms ease-in-out` transition.
### v2.14.0 (2026-08-19)
#### Motion geometry
- **BTN-Hover.11** Independent hover background radius became the Button's resolved root radius plus current expansion, sharing `200ms ease` with inset. For sm / md / lg, iconOnly and text Buttons gain 1px of radius when expanding 1px per edge; root size, content, and continuous-corner curve remain.
### v2.13.0 (2026-08-19)
#### Visual architecture
- **BTN-Corner.2** Replaced Button's hardcoded continuous corners with the shared cross-component rounded-rectangle primitive in `tokens.css` and `layout.css`. The hover background explicitly inherits the root curve; existing radius values, variants, bare mode, and ButtonGroup embedding remain.
### v2.12.0 (2026-08-19)
#### Visuals
- **BTN-Corner.1** Added `corner-shape: superellipse(1.1)` to gray / filled / outline / borderless root shells and independent hover backgrounds for mild continuous-corner smoothing close to ordinary rounding. Existing sm / md / lg radii, public radius overrides, bare mode, and ButtonGroup embedded ownership remain; unsupported browsers fall back to `border-radius`.
### v2.11.0 (2026-08-19)
#### Motion
- **BTN-Hover.10** Restored the hover color layer's opacity transition at `300ms ease-in-out`, slower than `200ms ease` background expansion for softer color entry and exit. Both commit their final state immediately under reduced motion.
### v2.10.0 (2026-08-19)
#### Motion
- **BTN-Hover.9** Using the real Test A2 sm `Small` Button at `54.78125 × 24px`, old `scale(1.05)` added `2.739px` total width and `1.2px` total height. Rounded each to the nearest 2px multiple, `2px`. Default hover then added 2px total width and height in all three sizes rather than proportional scaling by Button size or content width.
### v2.9.0 (2026-08-19)
#### Motion
- **BTN-Hover.8** Changed the lg hover background endpoint from `1.01` to `1.015`. Removed opacity transition from the Button hover background color layer so entry and exit switch immediately; scale motion remains.
### v2.8.0 (2026-08-19)
#### Motion
- **BTN-Hover.7** Hover background endpoint now follows final resolved size: sm `1.05`, md `1.03`, lg `1.01`. Size Context and explicit `size` retain Button's existing priority.
### v2.7.2 (2026-08-19)
#### Motion
- **BTN-Hover.6** Changed `BUTTON_HOVER_SCALE_UP_MOTION` background endpoint from `1.06` to `1.05`; content, layout dimensions, color feedback, and composite-control disabling remain.
### v2.7.1 (2026-08-19)
#### Performance
- **BTN-Hover.5** Separated base background from the hover color overlay. Scaling updates only the background `transform`, while color feedback updates only the overlay `opacity`; `color-mix()` background is no longer recomputed each frame during scale. Outline's existing border-color transition remains.
### v2.7.0 (2026-08-19)
#### Motion
- **BTN-Hover.3** Moved built-in hover scale from the Button root to an independent background layer; text, Icon, Spinner, state content, and hit area retain their size.
- **BTN-Hover.4** Gray / filled / outline / borderless retain base background plus overlay color composition. Borderless background expands from `0.84` to `1.06`; bare has no background layer and does not run built-in enlargement.
### v2.6.0 (2026-08-19)
#### Motion
- **BTN-Hover.1** Standalone action Buttons defaulted to enlarging the component root visual channel to `1.06` without changing layout size. Borderless kept Light 4% / Dark 10% hover color and expanded an independent background from `0.84` to full size; bare remained without background.
- **BTN-Hover.2** `scaleOnHover` controls the built-in default independently. Composite-control owners disable it by default but instances may explicitly opt in. Explicit `whileHover` takes over default scaling; disabled Buttons do not scale, and reduced motion commits the final ratio directly.
### v2.5.1 (2026-08-16)
- Restored Static White text and icon colors for Filled; the host baseline's inherited color no longer depends on CSS injection order to override the component foreground.
- Existing priority of external classes and inline styles remains unchanged.
- **Button-Docs.2026-05-25** Archived the historical changelog from the source header. New changes belong in this document's changelog; the source header retains only its role, current key architecture, and documentation path.
### v2.5.0 (2026-08-11)
#### Breaking changes
- **BTN-IconOnly.2** Added explicit `iconOnly`, default `false`. Button no longer infers single-visual-content layout from children DOM.
- **BTN-IconOnly.3** `iconOnly=true` emits `data-icon-only="true"` to coordinate symmetric padding, size context, bare minimum hit area, and render hints.
- **BTN-A11y.2** In development, an icon-only Button warns if it lacks `aria-label`, `aria-labelledby`, or `title`.
- **BTN-IconOnly.4** ColorSchemeButton, StyleButton, CopyButton, ExpandButton, and icon-only Button usages in the repository now declare `iconOnly` explicitly.
### v2.4.0 (2026-08-09)
#### Changes
- **BTN-Bare.2** `bare` now defaults to `emphasis="normal"`, retaining 100% opacity at rest and hover. Secondary actions explicitly use `emphasis="muted"` for 40% to 100% on hover. Disabled state still has priority through global `--snowui-state-opacity`.
- **BTN-Bare.3** CopyButton feedback inherits its host Button's resting bare emphasis rather than unconditionally returning to 40%.
### v2.3.2 (2026-07-08)
#### Fixes
- **BTN-Text.2** Default `--snowui-button-min-width` is now `max-content`, retaining the natural text + gap + padding minimum in outer flex-fill layouts such as Pagination `widthMode="fill"`. The outer layout can still stretch it when space permits, or handle wrapping/overflow when space is insufficient.
### v2.3.1 (2026-07-08)
#### Fixes
- **BTN-Text.1** Text Buttons now default to `white-space: nowrap`, preventing short labels such as “Previous / Next” from wrapping character by character in compressed layouts such as Pagination `widthMode="fill"`.
### v2.3.0 (2026-07-04)
#### New features
- **BTN-Blur.1** Added opt-in `backgroundBlur`, reusing BarChart overlay blur at `backdrop-filter: blur(1.25rem)`.
- **BTN-Blur.2** Added `--snowui-button-background-blur-override` to control blur strength.
### v2.2.0 (2026-06-23)
#### Breaking changes
- **BTN-Bare.3** Consolidated shell-free Button behavior into `bare` without a parallel entry. Bare retains normal content gap; for a single Icon it injects 12/16/20px size context and provides a transparent hit area of at least 16×16px.
- **BTN-Bare.4** Exact Icon size now comes from child Icon's `size`; Button no longer accepts a numeric size through shell-free mode.
### v2.1.0 (2026-06-22)
#### New features
- **BTN-Bare.1** Initially introduced shell-free `bare` mode for text, Icon, and other content, without padding, radius, background, or border. It used `currentColor × opacity: 0.4 -> 1` at the time; since 2026-08-09 that appearance requires explicit `emphasis="muted"`, while bare defaults to 100%.
- **BTN-Bare.2** When bare is placed in Tab, Tab's `--snowui-button-opacity-override` controls opacity on the same Button root, without multiplying two opacity layers.
### v2.0.0 (2026-06-01)
#### Breaking changes
- **BTN-Link.1** Removed `variant="link"` without a compatibility alias. Text links use a separate ``; button-style navigation continues to use `