components / button

button.

polymorphic button with five variants. supports icon-only / text-only / icon+text, an optional hover tooltip, and click-to-clipboard. renders as an anchor when given href, a button otherwise.

GitHub
installation
bunx @justin06lee/chrome@latest add button
usage
Variants
<Button variant="solid">solid</Button>
<Button variant="outline">outline</Button>
<Button variant="ghost">ghost</Button>
<Button variant="dashed">dashed</Button>
With icon
<Button icon={Menu}>menu</Button>
<Button icon={Github} label="GitHub" />
As link
<Button href="https://github.com" variant="solid">
visit github →
</Button>
Copy to clipboard
<Button icon={Copy} copy="hi@example.com" copyFeedback="copied!">
copy email
</Button>