HomePluginsToolsWorkflowAboutContact
GetSet

Premium UI/UX layout engines, customizable micro-interaction plugins, and high-performance components for modern web developers.

Plugins

  • Carousel
  • Select
  • Zoom
  • FlexoGrid
  • Sortable
  • Modal
  • Drawer
  • Tooltip
  • Popover
  • Toast
  • ContextMenu
  • Tabs
  • Accordion
  • Reveal
  • Autocomplete
  • Tags
  • Range
  • DatePicker
  • Upload
  • Cropper
  • Table
  • Tree
  • Editor

Company

  • Home
  • Plugins
  • Developer Tools
  • Showcase
  • Our Process
  • About Us
  • Contact

Policies

  • Terms and Conditions
  • Privacy Policy
  • Accessibility Policy
  • Cookie Policy

© 2026 GetSet. All rights reserved.

Crafted for frontend excellence.

Your Bundle

Your bundle is empty

Add plugins from the catalog to build one combined CDN link — like picking font families.

Browse plugins
Overlay Plugin

GS Modal

Accessible modal & dialog engine with focus trapping, scroll lock, stacking layers, and a catalog of backdrop styles (dim, blur, glass, gradient).

Latest: v1.0.2
Downloads last month: 172
Visit Demo Website

Install Package

npm i @get-set/gs-modal
or via CDN
<link rel="stylesheet" href="https://cdn.get-set.it/gs-modal/latest/gs-modal.min.css">
<script src="https://cdn.get-set.it/gs-modal/latest/gs-modal.min.js"></script>
Interactive Playground

Live Sandbox

Modal.jsx
1
2
3
4
5
6
7
8
9
import Modal from '@get-set/gs-modal';

export default function App() {
  return (
    <Modal>
      <div className="content">Your Modal content</div>
    </Modal>
  );
}
Live Preview

This is a real GSModal running your current option set — animation, backdrop, position, size…

Options

Configuration Values

Reference?Reference option.
Animation?Entrance animation name from the catalog.
Exit Animation?Separate exit animation name.
Animation Duration?Animation duration in ms.
Animation Easing?CSS easing applied to the dialog enter/exit animation.
Backdrop Animation?Backdrop's own animation (independent of the dialog).
Backdrop Animation Duration?Backdrop fade duration in ms.
Title?Optional header title.
Subtitle?Secondary line shown under the title in the header.
Footer?Footer area content. `false` (default) = no footer.
Size?Dialog size preset. Default: 'md'.
Width?Explicit width (overrides `size`).
Height?Explicit height. Number = px.
Max Width?Clamp width on small viewports.
Max Height?Clamp height; body becomes scrollable past this.
Min Width?Lower bound on width.
Min Height?Lower bound on height.
Fullscreen Below?Render full-screen when the viewport width is at or below the breakpoint (Bootstrap `modal-fullscreen-*-down` parity).
Position?Dialog position preset.
Backdrop Color?Overlay color. Default: rgba(17,24,39,.55).
Backdrop Opacity?Overlay opacity (0–1).
Backdrop Blur?Backdrop blur. `true`=8px; number=px; string=raw CSS length.
Backdrop Type?Rich backdrop layer preset (gradient/vignette/glass/aurora/liquid), layered on top of the backdrop primitives.
Close Button Position?Where the × close button sits (RTL-aware).
Auto Close?Auto-close after N ms.
Url?Fetch remote HTML into the body.
Iframe?Render an `<iframe src>` body sized to the dialog.
Image?Image URL shown in the body (pairs with `lightbox` styling).
Image Alt?Alt text for the `image` body.
Loader Html?Custom spinner content (HTML string).
Initial Focus?Explicit element to focus on open.
Theme?Visual theme. `auto` follows prefers-color-scheme.
Accent Color?Accent color for the focus ring / close button (CSS var --gsm-accent).
Class Name?Extra class name applied to the overlay root.
Trigger?Element(s) that open the modal on click.
Close Handler?Element(s) inside the content that close the modal on click.
Icon?Built-in animated icon shown above the body.
Icon Color?Override the preset icon color (defaults to a per-icon semantic color).
Text?Plain-text body (escaped).
Html?Rich HTML body content (string).
Confirm Text?Confirm button label.
Cancel Text?Cancel button label. Default: 'Cancel'.
Confirm Color?Confirm button background color.
Cancel Color?Cancel button background color.
Role?ARIA role for the dialog.

Feature Flags

API Specifications

OptionTypeDefaultDescription
referencestringnoneReference.
closeOnBackdropbooleantrueClose when the backdrop (area outside the dialog) is clicked. Default: true.
closeOnEscbooleantrueClose when Escape is pressed (topmost modal only). Default: true.
animationGSModalAnimation | false'zoom'Entrance animation name from the catalog. `false` disables all dialog motion. Default: 'zoom'.
exitAnimationGSModalAnimation | falsenoneSeparate exit animation name. Defaults to mirroring `animation` when omitted. `false` disables exit motion.
animationDurationnumber | { enter?: number; exit?: number }250Animation duration in ms. A number applies to both enter and exit; an object sets each independently. Default: 250.
animationEasingstring'cubic-bezier(.34,1.56,.64,1)'CSS easing applied to the dialog enter/exit animation.
backdropAnimationGSModalAnimation | false'fade'Backdrop's own animation (independent of the dialog). Default: 'fade'.
backdropAnimationDurationnumbernoneBackdrop fade duration in ms. Default: 200.
reducedMotion'auto' | boolean'auto'Honor `prefers-reduced-motion`. `'auto'` follows the OS setting; `true` always reduces; `false` never reduces. Default: 'auto'.
titlestringnoneOptional header title. When set, renders a header and wires aria-labelledby.
subtitlestringnoneSecondary line shown under the title in the header.
footerstring | falsenoneFooter area content. `false` (default) = no footer.
sizeModalSize'md'Dialog size preset. Default: 'md'.
widthnumber | stringnoneExplicit width (overrides `size`). Number = px.
heightnumber | stringnoneExplicit height. Number = px.
maxWidthnumber | stringnoneClamp width on small viewports. Default: 92vw.
maxHeightnumber | stringnoneClamp height; body becomes scrollable past this. Default: 90vh.
minWidthnumber | stringnoneLower bound on width.
minHeightnumber | stringnoneLower bound on height.
fullscreenbooleanfalseAlways full-viewport (no rounded corners, no margins). Default: false.
fullscreenBelowFullscreenBreakpointfalseRender full-screen when the viewport width is at or below the breakpoint (Bootstrap `modal-fullscreen-*-down` parity). `number` = px. Default: false.
positionGSModalPosition'center'Dialog position preset. Default: 'center'.
offsetGSModalOffsetnoneCustom nudge from the resolved position.
backdropboolean | 'static'trueBackdrop mode. `true` = dimmed, click-to-close. `false` = no overlay. `'static'` = overlay present but click does not close (plays a shake).
backdropColorstringnoneOverlay color. Default: rgba(17,24,39,.55).
backdropOpacitynumbernoneOverlay opacity (0–1). Applied as the overlay's alpha.
backdropBlurboolean | number | stringfalseBackdrop blur. `true`=8px; number=px; string=raw CSS length. Default: false.
backdropTypeGSModalBackdropTypenoneRich backdrop layer preset (gradient/vignette/glass/aurora/liquid), layered on top of the backdrop primitives.
showClosebooleantrueShow the built-in × close button. Default: true.
closeButtonPositionCloseButtonPosition'top-end'Where the × close button sits (RTL-aware). Default: 'top-end'.
scrollablebooleantrueBody scrolls independently; header & footer stay sticky. Default: true.
stickyHeaderbooleantruePin the header while the body scrolls (requires `scrollable`). Default: true.
stickyFooterbooleantruePin the footer while the body scrolls (requires `scrollable`). Default: true.
draggablebooleanfalseDrag the dialog by its header. Disabled for fullscreen. Default: false.
persistentbooleanfalseNon-dismissable mode: backdrop click, Esc and the × close button no longer dismiss the modal (only programmatic close()/closeModal()). Default: false.
autoClosenumber | falsefalseAuto-close after N ms. `false` (default) disables the timer. The countdown pauses while the pointer is over the dialog (see `pauseOnHover`).
autoCloseProgressbooleantrueShow a depleting countdown progress bar while `autoClose` runs. Default: true when `autoClose`.
pauseOnHoverbooleantruePause the `autoClose` countdown while the pointer is over the dialog. Default: true.
lockScrollbooleantrueLock `<body>` scroll while the modal is open. Combine with `scrollbarPadding` to avoid layout shift. Default: true.
disableScrollbooleannoneAlias of `lockScroll` (Micromodal naming). When set, overrides `lockScroll`.
scrollbarPaddingbooleantrueCompensate for the scrollbar width on `<body>` while locking scroll, so the page does not shift when the scrollbar disappears. Default: true.
urlstringnoneFetch remote HTML into the body. Shows the loading state until resolved.
iframestringnoneRender an `<iframe src>` body sized to the dialog.
imagestringnoneImage URL shown in the body (pairs with `lightbox` styling).
imageAltstring''Alt text for the `image` body. Default: ''.
lightboxbooleanfalseBorderless image lightbox styling (transparent dialog chrome). Default: false.
loadingbooleanfalseShow the loading state immediately (spinner replaces the body). Default: false.
loaderHtmlstringnoneCustom spinner content (HTML string). Defaults to the built-in spinner.
autofocusbooleantrueAuto-focus the first focusable element (or `[autofocus]`) on open. Default: true.
initialFocusHandlerTarget | falsenoneExplicit element to focus on open. `false` focuses the dialog container.
disableFocusbooleanfalseSkip auto-focus entirely (Micromodal parity). Default: false.
returnFocusbooleantrueRestore focus to the previously focused element on close. Default: true.
themeGSModalTheme'auto'Visual theme. `auto` follows prefers-color-scheme. Default: 'auto'.
accentColorstringnoneAccent color for the focus ring / close button (CSS var --gsm-accent).
rtlbooleanfalseRight-to-left layout. Default: false.
customClassGSModalCustomClassnonePer-part class overrides.
classNamestringnoneExtra class name applied to the overlay root.
triggerHandlerTargetnoneElement(s) that open the modal on click. selector | HTMLElement | React ref.
closeHandlerHandlerTargetnoneElement(s) inside the content that close the modal on click. selector | HTMLElement | React ref.
iconGSModalIconfalseBuilt-in animated icon shown above the body. One of success/error/warning/info/question, or `false` (default) for none.
iconColorstringnoneOverride the preset icon color (defaults to a per-icon semantic color).
textstringnonePlain-text body (escaped). Rendered as the modal body for presets.
htmlstringnoneRich HTML body content (string). Rendered as the modal body for presets.
showConfirmbooleanfalseShow the confirm button. Default: true for presets.
showCancelbooleanfalseShow the cancel button. Default: false.
confirmTextstringnoneConfirm button label. Default: 'OK'.
cancelTextstringnoneCancel button label. Default: 'Cancel'.
confirmColorstringnoneConfirm button background color.
cancelColorstringnoneCancel button background color.
reverseButtonsbooleanfalseInvert the confirm/cancel button order. Default: false.
roleGSModalRole'dialog'ARIA role for the dialog. `alertdialog` (used for presets/confirmations) defaults `closeOnEsc` and `closeOnBackdrop` to false.

Technical Features

Focus Trap

Cycles keyboard focus inside the dialog while open.

Scroll Lock

Freezes the background without layout shift.

Stacking Layers

Opens dialogs on top of dialogs with correct z-order.

Backdrop Catalog

Dim, blur, glass and gradient backdrop layers.