# Link changelog Read the complete [LICENSE](https://snowui.dev/LICENSE) for the installed version before use. Reviewed against Chinese source SHA-256 `d8272fe9fd3d0eee68f3dad4e042ec2b8be6472c9a4a7048bcecc7a967275ed4`. For version differences, check the installed package as well. ### v1.5.0 (2026-10-22) - Internal and external attachments retain at least 4 CSS px spacing from text. Graphics and single-line truncation use Frame singleLine while plain text flow remains unchanged. Link continues to own truncation. ### v1.4.0 (2026-10-14) - **LINK-Underline.2** Added `underline="until-hover"`: text is underlined normally and loses the underline on non-disabled hover. The Link root still explicitly owns link decoration, unaffected by native link rules in optional `snowui-base.css`. - 2026-09-21: Unified the usage guide, source property table, and Site / AI reading entry points. Documentation only; component behavior is unchanged. ### v1.3.0 (2026-09-16) - Added `color`. For all variants, the default hover transition is Black40 → Black100, Black100 → Black40, or any other resting color → Black100. Explicit `hoverColor` overrides, `false`, and existing Props remain supported. - `hoverColor=false` retains the resting color set through the color override. ### v1.2.3 (2026-08-15) - The Link root now explicitly declares `text-decoration: none`, so its default appearance no longer depends on bare `a` initialization in optional `snowui-base.css`. The public `underline` Prop still owns underline states. ### v1.2.2 (2026-07-02) - Restored Link’s default internal gap to 2px and removed residual formatting whitespace from projected leading / trailing slots. The root now defaults to `width: fit-content`, preventing a stretched column parent from expanding the middle Grid column and pushing trailing content to the far right. External Icons retain their own default size. ### v1.2.1 (2026-07-02) - Changed Link’s default internal gap from 2px to 4px for both built-in and external leading / trailing content. ### v1.2.0 (2026-06-23) #### Improvements - **LINK-Truncation.4** Adopted shared `fitTextToElement()`: Latin-alphabet text truncates only at whole-word boundaries and shows only an ellipsis if a whole word cannot fit. CJK text falls back to Unicode grapheme boundaries, avoiding half characters. - **LINK-Truncation.5** Uses `measureTextForElement()` to shrink truncated Content to the true width of visible text plus `…`, preserving the exact Link gap between the trailing Icon and ellipsis without an empty Content track. ### v1.1.1 (2026-06-23) #### Fixes - **LINK-Truncation.3** Separated the text measurement layer, explicit trailing `…` column, and Tooltip trigger host instead of relying on native ellipsis painting for focusable links. The ellipsis stays stable when Link is focused, pressed, or Tooltip activates; shared `TruncationController` state and detection logic are unchanged. ### v1.1.0 (2026-06-23) #### New features - **LINK-Truncation.1** Added single-line truncation with `lines={1}`. When text truly overflows, a Tooltip shows the full content by default. - **LINK-Truncation.2** Added `tooltip` and `onTruncate`, reusing the `TruncationController` shared with Text and TableCell for truncation detection. ### v1.0.3 (2026-06-01) #### Fixes - **LINK-Layout.4** Removed Link’s size override for external leading / trailing Icons. Built-in `ArrowUpRight` / `ArrowSquareOut` remain 12px; external Icons retain their own size and use Icon’s 16px default when no `size` is passed. ### v1.0.2 (2026-06-01) #### Fixes - **LINK-Layout.1** Projected external leading / trailing slots back to the Link root, restoring direct-child slot recognition, horizontal centering, and a unified gap under Frame’s three-slot protocol. - **LINK-Layout.2** The Link `[data-auto-layout]` root explicitly overrides the shared slot gap so built-in and external Icons and arrows all use the Link gap variable. - **LINK-Layout.3** The `arrow` variant now uses the built-in `ArrowUpRight` Icon, eliminating differences in side bearing from a text arrow glyph. ### v1.0.1 (2026-06-01) #### Fixes - **LINK-Hover.2** The trailing arrow, default Icon, and external trailing Icon now inherit text color and express hover with `opacity: 0.4 -> 1`, following the lightweight Icon convention. ### v1.0.0 (2026-06-01) #### New features - **LINK-Init.1** Added a standalone Link component, migrating the former Button Link default styling. - **LINK-Variant.1** Added `arrow` and `external` variants, matching Workshop Link styles 2 and 3. - **LINK-Hover.1** Added `hoverColor` for a custom hover color or an unchanged color on hover. - **LINK-Underline.1** Added `underline` with `none` / `always` / `hover` modes. - **LINK-Icon.1** The `external` variant includes a built-in trailing `ArrowSquareOut` Icon, replaceable through an external direct-child trailing slot. [Component guide](https://snowui.dev/llms/en/components/link.md) · [Full reference](https://snowui.dev/llms/en/components/link/reference.md)