shadcn.io is not affiliated with official shadcn/ui
Button examples · Secondary
Button with Right Icon (Secondary) for React
A muted button with an arrow after the label, when a supporting action leads people on to the next step in the flow.
Secondary color, the label, then an arrow. The arrow suggests forward. It is not a destination by itself.
Use it for See more or Continue when a primary button is already in the row. If nothing comes next, leave the arrow off the Button. In React, aria-hidden keeps the icon from being announced.
Preview
Installation
FAQ
Why is the arrow after the label?
The secondary button trails ArrowRightIcon with data-icon="inline-end". The arrow inherits the secondary foreground, is hidden from the accessible name, and flips in a right-to-left layout.
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 Count (Secondary)A count, kept quiet
- Button with Kbd (Secondary)A shortcut, kept quiet
- Button with Left Icon (Secondary)An icon, kept quiet
- Button with Text (Secondary)Quieter than the main action
- Loading Button (Secondary)A side action, while it runs
- Rounded Button (Secondary)A pill, kept quiet