shadcn.io is not affiliated with official shadcn/ui
Button examples · Outline
Button with Right Icon (Outline) for React
An outline button with an arrow after the label, when a secondary step should still feel like it goes forward from here.
A border, no strong fill, and an arrow after the text. The arrow is hidden from assistive tech.
Use it for View or Details beside a stronger action. If this is the press you want, use the filled Button. In React, data-icon only sets where the icon sits.
Preview
Installation
FAQ
Why is the arrow after the label?
The outline button ends with ArrowRightIcon and data-icon="inline-end". The arrow uses the label color, stays hidden from assistive tech, and swaps sides when the direction is right to left.
Does the arrow mean this navigates?
No. The arrow is decorative. The control is still a button with type="button", so it doesn't open a URL and it doesn't submit a form unless you pass type="submit".
How do I use a different icon?
Replace ArrowRightIcon and keep data-icon="inline-end" if it should stay after the label. Use inline-start if it should lead. Leave aria-hidden="true" on while the text is enough.
Related
- Button with Left Icon (Outline)An icon on an outline
- Button with Text (Outline)A border, no fill
- Button with Right Icon (Standard)An arrow on the main action
- Button with Right Icon (Link)An arrow after a quiet action
- Rounded Button (Outline)A pill with a border
- Button with Right Icon (Secondary)An arrow, kept quiet