Hero Ui

Chip

Buttons 6

About

Small informational badges for displaying labels, statuses, and categories.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Chip to your project and fits it to your theme.

Code

How Chip is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import * as React from "react";
import { Chip } from "@/components/ui/heroui-chip";

const initialChips = [
  { color: "default", label: "Default" },
  { color: "accent", label: "Accent" },
  { color: "success", label: "Success" },
] as const;

export default function ChipCloseableDemo() {
  const [items, setItems] = React.useState<Array<(typeof initialChips)[number]>>([...initialChips]);

  return (
    <div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
      <div className="flex flex-wrap items-center justify-center gap-3">
        {items.map((item) => (
          <Chip
            color={item.color}
            key={item.label}
            onClose={() => setItems((current) => current.filter((chip) => chip.label !== item.label))}
          >
            {item.label}
          </Chip>
        ))}
      </div>
    </div>
  );
}

export { ChipCloseableDemo };

More by Hero Ui

View all
  • DatePicker

    DatePicker

    465
  •  The Pagination

    The Pagination

    361
  • HeroUI Color Picker

    HeroUI Color Picker

    105
  • Skeleton

    Skeleton

    104
  • HeroUI Table

    HeroUI Table

    100
  • HeroUI Disclosure Group

    HeroUI Disclosure Group

    94
  • HeroUI AlertDialog

    HeroUI AlertDialog

    80
  • ComboBox

    ComboBox

    75

More in Buttons

View all
  • Button

    Button

    14
  • Button

    Button

    34
  • Texture Button

    Texture Button

    92
  • Button Save

    Button Save

    46
  • Button

    Button

    64
  • Button Group

    Button Group

    3
  • App Store Button

    App Store Button

    454
  • Notification Button

    Notification Button

    103