# Icon on top

> Icon badge pinned to the top-right corner.

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

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

## Install

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

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

## Dependencies

- Registry items: `avatar`

## Files

### `registry/patterns/avatar/avatar-13.tsx`

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

import {
  Avatar,
  AvatarBadge,
  AvatarFallback,
  AvatarImage,
} from '@/components/ui/avatar'

// AvatarBadge sits bottom-right by default. Flip it to the top-right corner
// with `top-0 bottom-auto` so it rests on the edge rather than over the face.
export function Avatar13() {
  return (
    <Avatar size="lg">
      <AvatarImage
        src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?q=80&w=200&auto=format&fit=crop"
        alt="Sofia Rodrigues"
      />
      <AvatarFallback>SR</AvatarFallback>
      <AvatarBadge className="top-0 bottom-auto group-data-[size=lg]/avatar:[&>svg]:size-2">
        <CameraIcon />
      </AvatarBadge>
    </Avatar>
  )
}
```
