shadcn.io is not affiliated with official shadcn/ui
Button examples · Outline
Rounded Button (Outline) for React
An outline button with fully rounded ends, when a secondary action should follow the pill shape of the rest of the page.
Outline, plus pill, so the border itself is a capsule. The border makes the round shape easier to see than it is on a link.
Use it for Skip or Back in a round onboarding step. In a data table, the square outline is easier to scan. Set pill on Button only where the shape is a real pattern. In React, pill doesn't round the neighbors for you.
Preview
Installation
FAQ
How do I get the fully rounded ends?
Pass pill. The component rounds the ends fully and marks the button with data-pill. Use the prop rather than a rounding class, so the shape stays the component's.
Does pill change the colors?
No. variant="outline" is the border on the background color, and pill rounds that border into a capsule. pill only changes the radius. The label, the type, and the click are the same as a square button of that variant.
When is a pill the wrong shape?
When the buttons around it have the normal radius. One pill in a square group looks accidental. Use it when the screen is already built from round controls.
Does the border follow the curve?
Yes. The outline variant's border is on the button, and pill rounds the whole control, border included.
Related
- Button with Text (Outline)A border, no fill
- Rounded Button (Standard)A pill for the main action
- Rounded Button (Link)Round ends on a quiet action
- Button with Left Icon (Outline)An icon on an outline
- Badge with Text (Standard)A default badge with a short label for a
- Rounded Button (Secondary)A pill, kept quiet