Feedback and overlays
Modal
Modal - An accessible dialog component Features: - Native dialog element for accessibility - Backdrop click to close (optional) - Escape key to close - Focus trap - Multiple sizes - Custom header/footer via snippets - Material 3 stylingPublic export
typescript
import { Modal } from '@happyvertical/smrt-ui/feedback';- Import path
@happyvertical/smrt-ui/feedback- Props
- 13
- Props described
- 13 of 13
- Bindable state
- 0
- Callback events
- 1
- Verified release
- 0.44.0
Props
NameTypeRequiredDescription
openbooleanNoWhether the modal is openonClose() => voidNoCallback when modal requests to closetitlestringNoModal titlesize'sm' | 'md' | 'lg' | 'xl' | 'full'NoModal size variantplacement'center' | 'start' | 'end'NoPlacement: center (default), start, or end for full-height drawerscloseOnBackdropbooleanNoWhether clicking backdrop closes modalcloseOnEscapebooleanNoWhether pressing Escape closes modalshowClosebooleanNoShow close buttonheaderSnippetNoCustom header snippetfooterSnippetNoCustom footer snippetchildrenSnippetNoMain contentariaLabelstringNoARIA label for the dialogariaDescribedBystringNoARIA described by IDBindable state
This component has no bindable public state.
Callback events
onClose() => void