Build Components

Spyglass

Popover. An anchored panel you can use: focus moves in, Escape closes it and comes back out.

Component
Popover
Pattern
Anchored dialog
Outputs
React + Tailwind, HTML/CSS/JS
Status
In stock, tested

Test bench

Runs the exported code, not a mock-up.

Output

Spyglass · React + TailwindFull width

Keyboard map
KeysWhat happens
EnterorSpaceOpen the popover. Focus moves to the first thing inside it.
TaborShift + TabMove through the actions inside.
EscClose it and put focus back on the trigger.

Take it home

React + Tailwind CSS v4: install with one command, or copy the file. Your options are already in it.

npx shadcn@latest add "/r/popover.json"

Run it in your project root. It writes components/popover.tsx with the options you set here. Needs Tailwind CSS v4 and a project set up for the shadcn CLI (npx shadcn@latest init).