Skip to content
All effects

Slide-over quote panel

Every quote button opens the form in a panel that slides in from the side, without leaving the page.

Interactive

This is the real effect. Scroll or move your mouse inside the frame to try it.

The prompt

Add a slide-over quote panel to this website: the quote or contact form slides in from the right side, without leaving the page. Markup: one panel for the whole site, using a native <dialog> element, placed once in the footer template, holding my existing form, a heading and a close button. Any link to #quote (or with a data-quote attribute) anywhere on the site opens it. Behaviour: the panel slides in from the right (transform translateX, about 400ms with a soft ease) while the page behind dims with a backdrop. It closes with the close button, the Escape key or a click on the backdrop, and slides out the same way. Opening it moves focus to the first field, focus stays inside the panel, and closing returns focus to the button that opened it. The page behind does not scroll while it is open. After a successful submit, the form is replaced by a thank you message in the same panel. On mobile the panel takes the full width. If the page itself is a contact page, scroll to the inline form instead of opening the panel. Respect prefers-reduced-motion by fading instead of sliding. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.

What it is

A form that slides in from the side, on top of the page you are on. Ask for a quote, close it, and you are right where you were.

When it works

For sites where the main action is asking for a quote or a call. Every quote button on the site can open the same panel. Nobody has to leave the product they were looking at to ask a question about it.

Get it right

  • Use one panel for the whole site, opened by any quote link.
  • Escape, the backdrop and the close button all close it, and focus goes back to the button.
  • Show the thank you message in the same panel, not on a new page.

Also called

  • Off-canvas form
  • Side drawer form
  • Slide-in panel
  • Quote drawer

More effects.

All effects