Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Button — variants

Five variants in a single row: Default, Outline, Ghost, Destructive, Secondary. Same shape, same height, different role.

The variant decides only the surface treatment (bg-* / border-*) — the typography, padding, and corner radius come from btn + the size class. That separation is why we can ship a new variant by adding one CSS rule and one enum case.

Class hooks mirror rust-ui's, so swapping in Tailwind later is a search- and-replace, not a rewrite.

Open as standalone demo →


Button API · Components index