shadcn.io is not affiliated with official shadcn/ui
Button examples · Link
Button with Text (Link) for React
Text in the primary color, with an underline on hover and no fill, when the action should read like a link and stay quiet.
The link variant is the label on its own. It uses the primary color and underlines when you hover, so it can sit in a sentence, a table cell, or a card footer.
Use it for View details, Learn more, or Skip. If the click should open another URL, use a real link. The filled Button is the one you want people to find first. In React, Base UI still renders a button, so this does not navigate on its own.
Preview
Installation
FAQ
Why doesn't this Button go anywhere?
variant="link" sets the look: primary-colored text, no fill, and an underline on hover (underline-offset-4). It is still a button, so the click doesn't open a URL.
How do I make it open a page in React?
Pass your link with render, such as render={<a href="/pricing" />}.
variant="link" if you still want the quiet text style.When does the underline show?
On hover. The label is plain until then. Add your own class if it should be underlined the whole time. The text color is the theme's primary color.
How is this different from an outline Button?
Outline has a border and a button shape. The link variant is the label on its own, so it can sit in a sentence, a table cell, or a card footer. The filled Button is the one people should find first.
Related
- Button with Left Icon (Link)An icon before a quiet action
- Button with Text (Standard)The one filled action
- Button with Text (Outline)A border, no fill
- Button with Text (Secondary)Quieter than the main action
- Button with Right Icon (Link)An arrow after a quiet action
- Breadcrumb with Ellipsis (Standard)A breadcrumb trail with a text Home link