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
- 14
- Props described
- 14 of 14
- Bindable state
- 0
- Callback events
- 1
- Verified release
- 0.57.40
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 IDdensity'comfortable' | 'touch'NoTarget density; omit to inherit the ThemeProvider setting.Bindable state
This component has no bindable public state.
Callback events
onClose() => void