Put it inside a link or a Button as its label. It rolls when the control is hovered, pressed, or focused.
The sample also uses Button. One command adds them with this item:
site-header.tsx
TextRoll
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| locale | string | — | The BCP 47 locale for the letter and word split (Intl.Segmenter). Default: the DisplayLocaleProvider locale, else "en-US". |
| children | string | — | The label. It rolls when the link or button around it is hovered, pressed, or has keyboard focus. |
| mode | "label""letters" | "letters" | letters (default): each letter rolls up, one after another. label: the whole label slides up and out while its copy slides in from below, as one block (a label on two lines too). |
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
| Tab | Moves the focus to the link or button around the label. The label rolls while it has keyboard focus. |
|---|





