shadcn.io is not affiliated with official shadcn/ui
Button examples · Link
Button with Right Icon (Link) for React
A link-styled button with an arrow after the label, when a quiet action should continue on to the next step in a flow.
The label comes first, then an arrow. The arrow is decorative, so the words have to say where this goes.
Use it for Next, Continue, or Open, when you want the forward cue without a filled button. If there is no next step, skip the arrow. A plain Button is clearer. In React, data-icon set to inline-end pads the icon after the text.
Preview
Installation
FAQ
Why is there an arrow on a link-styled Button?
ArrowRightIcon follows the label with data-icon="inline-end", so it sits in the icon padding and flips when the direction is right to left. variant="link" is primary text with an underline on hover, and no fill.
How do I make the arrow open a page in React?
The variant doesn't navigate, and the arrow doesn't either.
Pass your link with render, such as render={<a href="/pricing" />}.
Leave the icon where it is.
Can I use an external-link icon instead?
Yes. Any lucide-react icon works in that slot. Keep data-icon="inline-end" and aria-hidden="true". The icon is a hint. The label should still say where the click goes.
Is the arrow announced?
No. aria-hidden="true" removes it. Change the children from Button to the action, such as Next article, so the accessible name is the action.
Can this sit in a sentence?
Yes. With no fill, the label and the arrow can live in a paragraph or a card footer. Use a filled Button when this should be the main action on the page.
Related
- Button with Left Icon (Link)An icon before a quiet action
- Button with Text (Link)Underline on hover, no fill
- Button with Right Icon (Standard)An arrow on the main action
- Button with Right Icon (Outline)An arrow on an outline
- Breadcrumb with Ellipsis (Standard)A breadcrumb trail with a text Home link
- Rounded Button (Link)Round ends on a quiet action