Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Button with Right Icon (Secondary) for Ark UI

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, Ark UI keeps the icon from being announced.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.
Use email insteadNo credit card

Anatomy

Button anatomy: root, icon, text

Usage

<Button variant="secondary">
  Button
  <ArrowRightIcon aria-hidden="true" data-icon="inline-end" />
</Button>

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.

How does secondary change the arrow?

The arrow inherits the secondary foreground. variant="secondary" is the quieter fill, for a forward action that sits beside a primary one.

Can I disable it?

disabled fades the label and the arrow together.

What does a screen reader hear?

The label, Button in this demo. The arrow is hidden. Rename the children to the action, such as Next or Continue, so the name matches the arrow.

API Reference

Button

Sets variant="secondary". The rest is on the Button page.