# Modal Generator > Make an animated, accessible modal dialog and copy the code. Type what the dialog says (or pick an example) and get a centred dialog, bottom sheet or side drawer built on the native dialog element: the page behind dims and can blur, the box arrives, its title, message and buttons follow it in one after another, and it leaves faster than it came. Timed to the animation rules for modals, checked for contrast, keyboard and screen-reader ready, copied as HTML, CSS and JS or React. Free, no sign-up, runs in the browser. URL: https://modal-generator.skillsafe.ai/ ## What it does - Reads the dialog from the visitor's words: the first line is the title, the next lines (up to 3) are the message; one long line is split after its first question or sentence. A line like [Cancel] [Delete] names the buttons; otherwise the title's first word picks them ("Delete this file?" gives Cancel and a red Delete, with focus starting on Cancel). A colour like #2563eb sets the button colour. Characters such as & and quotes are kept and escaped in every output. - The preview is a real dialog in a phone-sized frame: press the button inside it (or Open / close) to watch the page dim, the box arrive and the content follow. Every change plays again. - Kind: centred dialog, bottom sheet (slides up) or side drawer (slides in from the right). Entrance for a centred dialog: grows in from 0.9 while rising 20 px, grows with a small overshoot to 1.02, fades in, or rises in. - Options: button colour, title, message, button labels, "it deletes something", arrival, exit and backdrop times, the entrance curve (smooth cubic-bezier(0.16, 1, 0.3, 1), ease out, ease in and out, linear), content delay and stagger, dim, blur, what a click outside does (close, or shake for 300 ms when an answer is needed), dialog colour, width, corner radius, the opening button's label and the CSS class name. - Checks, against the modals-dialogs skill: enter in 250-350 ms with ease-out or the smooth curve (never linear), exit in about 200 ms (150-250 accepted) with ease-in and faster than the entrance, backdrop fade 200-250 ms, content 50-100 ms after the box and 30-50 ms apart, backdrop dim 50-70% and a slight 4-8 px blur (or none). Also the page's own 4.5:1 contrast check for the text and the main button. A "Fix it" button applies the rule values. - Copies HTML + CSS + JS, CSS, HTML, the JavaScript initModal function (the one the preview itself runs: showModal, exit played before close, Escape and the buttons close, a click outside closes or shakes, focus returns to the opener, reduced motion skips the wait), or a React component; downloads a standalone .html page; copies a link that reopens the dialog. Every version has a prefers-reduced-motion rule. - Keeps a list of the dialogs you copied or downloaded (in your SkillSafe account when signed in, and in the browser). ## Optional AI step (signed-in, metered) "Advice for your dialog" sends the current settings, the dialog's words, the page's check and a description of what the dialog is for, and returns: keep or change, a summary, how it arrives (kind, entrance, time, curve), the exit time, the backdrop (fade time, dim, blur, what a click outside does) and the content timing (delay, stagger), each with a reason, the animation principles at work and what to avoid. The page checks every value against the same rules before offering "Use this dialog". API: https://modal-generator.skillsafe.ai/api.html (task "advise"). ## Source Adapted from the agent skill @dylantarre/modals-dialogs (dylantarre/animation-principles, MIT, by Dylan Tarre), which applies Disney's 12 principles of animation to modals, dialogs, popovers and overlay content: https://skillsafe.ai/skill/@dylantarre/modals-dialogs