Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Button examples · Standard

Rounded Button (Standard) for React

A filled button with fully rounded ends, when the main action should match the other pill controls already on the page.

Framework
UI library

The default button with pill set, so it is a capsule instead of the usual radius. Match the cards and inputs around it, or it looks accidental.

Use it for a primary action on a round screen, like a mobile sheet. If the rest of the app is square, leave pill off the Button. In React, the radius comes from that prop.

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.

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. This button leaves variant off, so it's the primary fill with fully round ends. 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.

Is the label still just Button?

Yes. pill doesn't add text. Replace the children with the action, such as Follow or Subscribe, when that's the word you want on a pill.

Will it submit a form?

Only if you pass type="submit". The default type is button, same as the square primary button.

What does disabled do to a pill?

disabled fades it and ignores the click. The round ends stay. The shape doesn't change the disabled behavior.