Webflow maintenance

How do I add a modal in Webflow?

Add a Webflow modal, open it from a button, add your own close button, and test Escape before you publish.

THE SHORT ANSWER

Open the Add panel, go to Advanced, and drag Modal onto the canvas. Put your content inside it. Select a Button, open Element settings, choose Modal under Link settings, pick that modal, and set Show. Modals have no close button until you add one with Hide. Escape closes the modal. Clicking the backdrop does not. Modals are available on every Site plan, including the free Starter plan.

Add the modal and name it

A modal sits on top of the page and keeps the visitor on that layer until they close it. Webflow says it uses the browser's native dialog element, so focus and keyboard behavior are built in. Published modals open and close without Webflow JavaScript, unless you animate them. They are available on every Site plan, including the free Starter Site plan.

Open the Add panel, scroll to Advanced, and drag Modal onto the canvas. The element starts empty. Put the content inside it: a heading, a short paragraph, and a form if the modal is a signup. In the Navigator, give it a name you will recognize, such as Newsletter modal.

You can also convert a Box you already built. Right-click the Box, click Convert to, and choose Modal.

While you design, the modal can cover the page. Select it and use Show on canvas or Hide on canvas in the toolbar. That switch is only for you in the Designer.

This is not a lightbox. A lightbox opens images or video from a thumbnail. The lightbox guide is that slideshow. A modal is for a message or a form.

Open it from a button

A modal has two parts: the modal, and a button that opens it. Only a Button element can do that. A text link or a link block will not show Modal in its link types.

Select the button on the page, not the one you will use to close. Open Element settings. Under Link settings, choose Modal, choose the modal you named, and choose Show. Show only opens it. Hide only closes it. Modals do not support Toggle.

The same modal can have more than one opener. A button in the hero and a button in the footer can both use Show on Newsletter modal. The button guide is how to add the button and its label. This page is how that button opens the modal.

Example: the homepage button says Get the checklist. Its Link settings are Modal, Newsletter modal, Show. The words on the button are the label. They are not the link type.

Add a close button and the form

Webflow does not include a close button. Add a Button inside the modal. Select it, open Element settings, choose Modal, choose the same modal, and choose Hide.

If the modal holds a form, you can close it when the visitor submits. Select the form, open Element settings, and check Close modal after submit. The form's own success message is a separate setting. The success message guide is that text. The checkbox only closes the modal.

By default, the page behind an open modal can still scroll. Select the modal, open Element settings, go to Modal settings, and check Lock scrolling while open when the page should stay still.

Give the modal an accessible name so a screen reader can announce it. Select the modal, open Element settings, go to Custom attributes, click the plus next to Attributes, and add aria-label with a short value such as Newsletter signup.

Style the backdrop and test the keyboard

Style the modal in the Style panel the same way you style any other element. To style the area behind it, open the Element states menu in States and choose Backdrop. A backdrop filter is one way to dim that area. The filter does not add a click-to-close. Visitors still need the Hide button or the Escape key.

When the modal is open, Webflow says the page behind it cannot be clicked, and Tab stays inside the modal. Escape closes it. Clicking outside does not.

You can add a fade from Modal settings. Select the modal, open Element settings, go to Modal settings, and click Animate open/close. That adds a fade on the modal and the backdrop, and you can change it. For your own animation, open the Interactions tab, under Trigger on choose Modal toggle, click the plus next to Open actions, and pick an action such as Fade in. Repeat that next to Close actions. An animated modal adds JavaScript to the published page. A modal without that animation does not.

Test in Preview, which uses the same native behavior as the published site. Click Get the checklist, press Tab through the fields, press Escape, and confirm the modal closes. Then publish and repeat the click on the live page.

Fix a copy that opens the wrong modal

If you duplicate a block that holds both the button and the modal, the new button still opens the original modal. Select the copied button and choose the copied modal under Link settings. Do the same for the copied Hide button.

A modal's ID cannot be changed. Hover is not a native open. Webflow says a hover open uses an IX3 hover trigger. Use a button with Show when you want the native click.

Adding a modal on a page you already have is ordinary layout work on an existing site. The membership is one plan for every existing Webflow site: $999 per month, including 10 hours of Webflow work. Additional work is $75 per hour and starts only after you approve a written estimate.

Questions & answers

Why does my text link not offer Modal?

Only a Button element can open a modal. Link blocks and text links do not show the Modal link type. Use a button for Show, and another button inside the modal for Hide.

I clicked the dimmed page and the modal stayed open. Is that a bug?

No. Webflow says clicking the backdrop does not close a modal. Add a button with the Hide action, or press Escape. Escape closes it.

The copied signup still opens the original modal. What do I change?

A duplicate that holds both the button and the modal leaves the new button pointed at the original modal. Select the copied button and choose the copied modal in Link settings.

Can I open the modal by hovering the button?

Not as a native action. The native open is a button click with Show. Webflow says a hover open uses an IX3 hover trigger, which is separate from Link settings.

Sources & further reading

Need a hand with your Webflow site?

View membership