Getting started
...
Components
Modal Components
11 min
modal components purpose display popup windows for specific user actions and confirmations key features overlay background focus management keyboard navigation accessibility support customizable positioning 1\ form modal purpose collect user input within a modal dialog structure modal header/title email input field message textarea field cancel button submit button components used modal container text input (email) textarea (message) action buttons overlay background features required field indicators input validation error display capability clear action buttons dismissible via cancel button when to use user information collection contact forms feedback submission user registration newsletter signup 2\ large modal purpose display dashboard metrics and kpi information structure modal header with title large modal container kpi cards displaying metrics statistical data display action buttons components used modal container (large size) card components data display elements metric values button components contents dashboard style layout multiple kpi cards quick actions section data visualizations when to use analytics dashboard display performance metrics large information displays complex data presentation dashboard summaries 3\ modal (confirmation dialog) purpose confirm destructive or important user actions structure modal title message/description text icon (optional warning/info) cancel button confirm button components used modal container close button (x) descriptive text action buttons (cancel, confirm) overlay background features clear action description warning message display consequence explanation prominent action buttons easy dismissal best practices make cancel button visible use clear language explain consequences provide option to undo when possible when to use confirming deletions important actions destructive operations user acknowledgment needed critical decisions 4\ side modal purpose display form or content in a side panel modal structure modal positioned on side form fields or content area close button submit/action button dismissible design components used side panel container form elements input fields action buttons close icon features slides in from side does not block entire screen scrollable content area quick access positioning compact layout when to use side forms quick input panels filters or settings additional options progressive disclosure 5\ alert modal purpose display alert messages requiring user attention structure alert icon (warning, error, info, success) message/description title/heading action buttons overlay background components used modal container alert icon text content action buttons close functionality alert types error alerts (red icon) warning alerts (yellow icon) success alerts (green icon) info alerts (blue icon) when to use error notifications warning messages success confirmations system alerts user attention required 6\ medium modal purpose display standard information or forms in medium sized modal structure modal header with title message/description content form elements (if applicable) cancel button action button (create, save, confirm) components used modal container (medium size) text content area input fields action buttons close icon features balanced modal size standard information display multi purpose usage clear action buttons responsive sizing when to use general confirmations standard forms information display user decisions item creation/editing modal comparison table modal type purpose size primary use key components form modal collect input medium data collection input fields, submit button large modal display metrics large dashboard display kpi cards, data visualization modal confirm action medium confirmations buttons, warning text side modal side content side panel forms, filters form elements, close button alert modal alert messages small medium notifications icon, message, close medium modal general purpose medium various uses title, content, buttons common modal features all modals include ✓ overlay background (darkened backdrop) ✓ focus trap within modal ✓ close button (x icon) ✓ action buttons (cancel, confirm, etc ) ✓ responsive design ✓ keyboard navigation support ✓ escape key dismissal ✓ aria labels and roles accessibility features all modal components support focus trap within modal aria labels and roles keyboard navigation (tab, enter, escape) close on escape key screen reader support high contrast support focus visible states semantic html structure styling considerations standard modal styling overlay opacity 0 5 0 7 (semi transparent dark background) modal size responsive (adjusts to screen size) animation on open/close smooth fade/slide z index management positioned above other content responsive behavior mobile optimized padding and spacing consistent with design system shadow/elevation visible modal depth customization options for all modals content customization update titles and headings modify message text change button labels update action text visual customization modify background color/opacity change button colors adjust modal sizing customize animations change icon appearance functional customization add/remove form fields change button actions add custom validators modify close behavior add loading states modal usage workflow select modal type choose appropriate modal for use case customize content update text, buttons, and form fields add styling apply custom colors and sizing set behavior configure actions and close behavior test accessibility verify keyboard navigation and screen reader support integrate add to page and wire up functionality benefits of using modal components consistent user experience pre built accessibility features professional appearance production ready code easy to customize responsive design keyboard navigation included screen reader support