Fill in these first
- Component: [e.g. tabs, modal dialog, accordion, combobox, image carousel]
- What it shows and does: [describe the behaviour and states]
- Props it needs: [list or describe]
- Styling approach: [CSS modules, Tailwind, plain CSS, styled-components]
- React version and framework: [e.g. React 19 with Next.js]
- Libraries allowed: [none, or list]
Task
Write the component so it works with a mouse, a keyboard and a screen reader, and is laid out for a 360px screen first.
Output format
- The component file in one code block, TypeScript with strict types.
- Styles in a second code block, mobile-first with min-width breakpoints only.
- | Prop | Type | Required | Default | Description |
- Usage example.
- Keyboard interactions: | Key | Action |
- Accessibility checklist: focus visible, focus trap or return where relevant, labels, roles, states announced, colour contrast.
Rules
- Use native HTML elements first; add ARIA only where no native element fits.
- No inline event handlers on non-interactive elements.
- No external libraries unless allowed in the inputs.
- Comments explain non-obvious behaviour only.
- Respect reduced motion for any animation.
Example
| Key | Action | | Escape | Closes the dialog and returns focus to the button that opened it |






