Actions

Icon button

A bare icon in the header: search, wishlist, account, bag. A 40px target around a 20px glyph, with an optional count set inside the bag.

components/coach/icon-button.tsx

Examples

Header icons
On the charcoal bar

Usage

components/coach/icon-button.tsx
import { ShoppingBag } from "lucide-react";
import { IconButton } from "@/components/coach/icon-button";

<IconButton badge={2} label="Bag, 2 items">
  <ShoppingBag />
</IconButton>

Props

PropTypeDefaultDescription
label*stringThe accessible name. Required: the button has no visible text. Include the count when there is one.
badgenumberA count set inside the glyph, as on coach.com. Zero still shows.
children*ReactNodeOne Lucide icon. The stroke is set to 1.25 for you.
...propsButtonHTMLAttributesonClick and the rest.

Guidance

Do

  • Use Lucide icons at stroke 1.25 so they match the hairline type.

Don't

  • Add a filled background or a circle. The glyph is the button.

Where it's used