# Profile Drawer

> A GitHub-light fixed top bar — a mark logo, a Dashboard title, Octicon action buttons with an unread inbox dot and an avatar — that opens a right-side profile drawer of menu links, closing on Escape, outside-click or the X with focus returned to the avatar trigger.

- Category: Menu
- Frameworks: Vanilla, React + CSS, React + Tailwind
- Design system: Vector
- Dark mode: yes
- Access: premium (Atheros AI Pass)
- Tags: navigation, profile
- Page: https://builder.atheros.ai/components/profile-drawer
- Preview: https://d17nmjscumqk5d.cloudfront.net/builder/templates/tpl_builder_profile_drawer/preview-b8000d4890a2.webp

## Features

- Fixed GitHub-style top bar with a mark logo, a hoverable Dashboard page title and a hairline bottom border
- Right-aligned Octicon action buttons — Issues, Pull requests and Notifications with an unread blue dot — each carrying an `aria-label`
- Avatar trigger opens a right-side profile drawer with a translate/opacity slide, closing on the X, on Escape and on outside-click
- Focus moves to the close button on open and returns to the avatar trigger on close
- Data-driven — navigation actions, the profile identity and the menu rows all render from `js/data.js` through `esc()`
- Official GitHub Octicons live in a JS icon registry and render via `innerHTML`, keeping the source glyphs 1:1
- Avatar image degrades to a token-colored initials disc through a single delegated `error` listener
- Coherent GitHub-dark counterpart under `body.dark`; fully respects `prefers-reduced-motion`

## Accessibility

- **Navigation landmark** — `<nav aria-label="Global">` wraps the top bar
- **Menu semantics** — The drawer list is `role="menu"` with `role="menuitem"` rows and `role="separator"` dividers
- **Avatar trigger** — `<button aria-haspopup="menu" aria-expanded aria-controls="pfd-drawer">` with an `aria-label`
- **Labelled controls** — Every action button and the close button carry an `aria-label`
- **Focus management** — Focus moves to the close button on open and returns to the avatar trigger on close
- **Escape and outside-click** — Escape and clicks outside the drawer close it
- **Decorative icons** — The notification dot and Octicon spans are `aria-hidden="true"`
- **Focus indicators** — `:focus-visible` outlines drawn with `--ring`
- **Reduced motion** — `prefers-reduced-motion: reduce` disables all animations

## Keyboard shortcuts

- `Tab` — Move focus between the bar controls and the trigger
- `Enter` — Activate the focused button; the avatar trigger toggles the drawer
- `Space` — Activate the focused button
- `ArrowDown / ArrowUp` — Move focus between menu rows while the drawer is open
- `Home / End` — Jump to the first or last menu row
- `Escape` — Close the drawer and return focus to the avatar trigger

## Common questions

**Which frameworks is Profile Drawer available in?**

Profile Drawer ships as Vanilla, React + CSS and React + Tailwind — HTML, CSS, JS and React source you can copy, download or clone into Atheros AI Builder.

**Is the Profile Drawer menu component free?**

Profile Drawer is a premium component. Anyone can preview it; the source, downloads and AI customisation are included with Atheros AI Pass.

**Does Profile Drawer support dark mode?**

Yes. Profile Drawer ships light and dark themes, both drawn from the Vector design system's tokens. Switch the preview to dark mode to compare them.

## Get the code

Preview Profile Drawer live, then sign in to copy or download the source, apply another design system, or ask the AI assistant to change it: https://builder.atheros.ai/components/profile-drawer

Every component on https://builder.atheros.ai is also reachable from Claude Code, Cursor and Codex through the Atheros MCP server (paid plans). Component index: https://builder.atheros.ai/llms-components.txt
