Claude Code modal templates for AI websites and apps
Real modal designs you can copy into Claude Code. Claude Code turns a pasted template into code in whatever stack your project already uses, from plain HTML to Next.js or SvelteKit. Below: the designs, how to set Claude Code up so it keeps the design, and what makes a good modal section.
Claude Code modal templates
13 modal design templates for Claude Code. Browse the full BrowserMoon library for every template category.
Browse all templatesHow to use modal templates with Claude Code
Pick a design
Choose a modal design above and open it to see it live.
Copy the template
Copy the template from its page. It is one HTML file with no dependencies.
Set up Claude Code
Save the template in your repo, for example as design/template.html, and point to it from CLAUDE.md so Claude Code reads it at the start of every session.
Prompt, then refine
Paste it and describe your product. Then follow up with: "Rebuild this section in our stack using design/template.html. Keep its spacing, type sizes and colours exactly; change only the text."
What makes a good modal section
Common types: confirm dialogs, upgrade prompts, short forms and command palettes.
One task per modal
Confirm, choose or fill one short form.
Easy to close
A close button, the Escape key and a click outside.
Focus stays inside
Keyboard users can finish without getting lost.
Common mistake: Modals that open on page load and block reading.
Keeping the design in Claude Code
Claude Code works in your terminal on a real codebase, so it suits developers who want the design built into an existing project and kept consistent across many sessions.
What Claude Code builds
Code in whatever stack your project already uses, from plain HTML to Next.js or SvelteKit.
Where the design goes
Save the template in your repo, for example as design/template.html, and point to it from CLAUDE.md so Claude Code reads it at the start of every session.
Claude Code and modal sections
Without a rule in CLAUDE.md, later sessions drift back to generic spacing and colours. Paste the template again with your follow-up prompt if it starts to drift.
What to tell it
Keep the modal size and layout, make Escape and the close button work, and keep focus inside the modal.
Set it up once with our CLAUDE.md design template.
Not sure which modal design fits?
Ask Mon, the AI design assistant, describe your product and Mon suggests the modal design and how to prompt Claude Code with it.
Frequently asked questions
How do I use a modal template in Claude Code?
Paste the template code into your Claude Code session and tell it what to build around the design. Save the template in your repo, for example as design/template.html, and point to it from CLAUDE.md so Claude Code reads it at the start of every session.
What does Claude Code turn the template into?
Code in whatever stack your project already uses, from plain HTML to Next.js or SvelteKit.
How do I stop Claude Code changing the design?
Without a rule in CLAUDE.md, later sessions drift back to generic spacing and colours. A follow-up prompt that helps: "Rebuild this section in our stack using design/template.html. Keep its spacing, type sizes and colours exactly; change only the text."
What makes a good modal section?
One task per modal: confirm, choose or fill one short form. Easy to close: a close button, the Escape key and a click outside. Focus stays inside: keyboard users can finish without getting lost.
Any Claude Code tips for modal sections?
Without a rule in CLAUDE.md, later sessions drift back to generic spacing and colours. Paste the template again with your follow-up prompt if it starts to drift.
More Claude Code template categories
Modal templates for other tools