TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/finsweet/attributes/llms.txt
Use this file to discover all available pages before exploring further.
fs-modal attribute creates accessible modal popups with animations, focus trapping, and keyboard navigation support.
Overview
Modal provides a complete solution for creating accessible popup dialogs in Webflow. It includes:- Accessible ARIA attributes and focus management
- Customizable animations with multiple presets
- Open and close triggers
- Keyboard navigation (ESC to close)
- Focus trap to keep users within the modal
Basic Usage
Modal Structure
Create a modal with open and close triggers:The modal element should be hidden by default using CSS (
display: none). The attribute will handle showing and hiding with animations.Attribute Reference
Element Attributes
| Attribute | Value | Description |
|---|---|---|
fs-modal | modal | Defines the modal container element |
fs-modal | open | Defines a trigger that opens the modal |
fs-modal | close | Defines a trigger that closes the modal |
Settings Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
fs-modal-animation | fade, slide-up, slide-down, slide-left, slide-right, grow, shrink, spin | - | Animation type for showing/hiding |
fs-modal-easing | linear, ease, ease-in, ease-out, ease-in-out | - | Easing function for animation |
fs-modal-duration | Number (milliseconds) | - | Duration of the animation |
fs-modal-display | block, inline, flex, grid, inline-block, inline-flex, inline-grid, contents, none | flex | CSS display property after animation |
Animation Options
Fade
Fade
Smoothly fades the modal in and out.
Slide
Slide
Slides the modal from the specified direction (
slide-up, slide-down, slide-left, slide-right).Scale
Scale
Grows or shrinks the modal (
grow, shrink).Spin
Spin
Rotates the modal while fading in.
Examples
Multiple Modals
Create multiple modals on the same page by using unique identifiers:Modal with Backdrop
Custom Easing and Duration
Accessibility Features
Focus Trapping
Keeps keyboard focus within the modal when open, preventing users from tabbing to elements behind it.
Keyboard Navigation
Press ESC to close the modal, providing an intuitive exit method.
ARIA Attributes
Automatically adds proper ARIA attributes for screen readers.
Focus Restoration
Returns focus to the trigger element when the modal closes.