sigilUI

Modal

Open a titled dialog from a supplied trigger.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { Modal, ConfirmDialog, PromptDialog, ResponsiveDialog, Lightbox, ImagePreview, Spotlight, CommandMenu, ActionMenu, OverflowMenu, MegaMenu, ContextPanel, PopoverForm, FloatingPanel, TooltipGroup, Tour, TourStep, Coachmark, HotkeyProvider, ShortcutRecorder } from "@sigil-ui/components";

Usage

<Modal trigger={<Button>Open modal</Button>} title="Modal Title" description="This is a modal dialog.">
  <p>Modal content goes here.</p>
</Modal>

Sub-components

This component includes the following parts:

  • <ConfirmDialog>
  • <PromptDialog>
  • <ResponsiveDialog>
  • <Lightbox>
  • <ImagePreview>
  • <Spotlight>
  • <CommandMenu>
  • <ActionMenu>
  • <OverflowMenu>
  • <MegaMenu>
  • <ContextPanel>
  • <PopoverForm>
  • <FloatingPanel>
  • <TooltipGroup>
  • <Tour>
  • <TourStep>
  • <Coachmark>
  • <HotkeyProvider>
  • <ShortcutRecorder>

Props

PropTypeDefaultDescription
triggerReactNode—Trigger configuration.
titleReactNode—Heading displayed in the component.
descriptionReactNode—Supporting text below the heading.
footerReactNode—Footer configuration.
childrenReactNode—Content rendered inside the component.
contentClassNamestring—Content Class Name configuration.

Token integration

CSS VariablePurpose
--s-radius-mdRadius md
--s-text-mutedText muted
--s-borderBorder
--s-card-radiusCard radius
--s-surfaceSurface
--s-shadow-lgShadow lg
--s-overlay-surfaceOverlay surface
--s-overlay-shadowOverlay shadow
--s-textText