Sign up and get 15% off every plan.

Sign up
Menu
ButtonsHeroUIApache-2.0 licenceFree

Button

A button in seven styles, from solid to ghost to danger.

Add it to your project

Or install the packages yourselfTerminal
npm install @heroui/react

The code

components/button-demo.tsxReact
/**
 * Demo from HeroUI, https://heroui.com (docs example button/variants.tsx).
 * Apache-2.0, Copyright 2025 NextUI Inc. Full text: https://github.com/heroui-inc/heroui/blob/main/LICENSE
 * Changed for Tastebud: a default export (HeroUI's docs use named ones).
 */
import {Button} from "@heroui/react";

export default function ButtonDemo() {
  return (
    <div className="flex flex-wrap gap-3">
      <Button>Primary</Button>
      <Button variant="secondary">Secondary</Button>
      <Button variant="tertiary">Tertiary</Button>
      <Button variant="outline">Outline</Button>
      <Button variant="ghost">Ghost</Button>
      <Button variant="danger">Danger</Button>
      <Button variant="danger-soft">Danger Soft</Button>
    </div>
  );
}

Changed for this site: A default export (HeroUI's docs use named ones).