# Santa Hat Avatar – Christmas Hat for the Navbar Profile Avatar

> Santa Hat Avatar for React and Tailwind CSS (shadcn/ui): a profile avatar that wears a Santa hat, made for the account button in the top right of a navigation bar. Wrap an image or any avatar element and the hat drops on with a small squash, rocks into place and its pom-pom swings; hovering makes it wobble again. A wearing prop puts the hat on or lifts it off, so a single Holiday mode switch in the account menu can dress or undress the avatar, and a delay prop staggers several avatars. Size, hat scale, position, rotation, ring, speed, a nudge counter and an onLand callback are props, and the avatar keeps its own alt text while the hat stays hidden from assistive technology. Reduced motion shows the hat in place without animation. The demo is a glass navigation bar with search, notifications and an account menu whose Holiday mode item takes the hat off and puts it back. Requires React only, no animation library, and one hat image.

- Author: [DHxWhy](https://21st.dev/@dhxwhy)
- License: mit
- Tags: Avatar, Profile, Navbar
- Live preview: https://21st.dev/@dhxwhy/components/santa-hat-avatar

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/dhxwhy/santa-hat-avatar?api_key=$API_KEY_21ST"
```

Requires a 21st API key (generate one at https://21st.dev/mcp) passed as `API_KEY_21ST`. Free accounts get a limited number of installs per day; unlimited on a paid plan — see https://21st.dev/pricing.

Full component directory: https://21st.dev/llms.txt · More like this: https://21st.dev/community/components/s/avatar.md
