# With badge

> Notification count badge overlapping an icon button.

A shadcn/ui block from the [@flx](https://ui.flexnative.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/flx/button-12).

- Page, with a live preview: https://shadcn.exchange/r/flx/button-12
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/flx/button-12-light-151fb7e7fc57e78f.png
- Registry item: https://ui.flexnative.com/r/button-12.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/button-12.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `lucide-react`
- Registry items: `button`, `badge`

## Files

### `registry/patterns/button/button-12.tsx`

```tsx
import { BellIcon } from 'lucide-react'

import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'

export function Button12() {
  return (
    <Button
      variant="outline"
      size="icon"
      className="relative"
      aria-label="Notifications"
    >
      <BellIcon />
      <Badge className="absolute -top-1.5 -right-1.5 h-4 min-w-4 rounded-full bg-emerald-500 px-1 text-white">
        3
      </Badge>
    </Button>
  )
}
```
