A button that triggers a modal with the specified layout components.
Note: We do not support the use of forms inside a modal.
button {
title = "Terms and conditions"
behavior = ModalBehavior.build {
title = "Terms and conditions"
content {
paragraph {
text = "Welcome to our application. If you continue to browse and use this application, you are agreeing to comply with and be bound by the following terms and conditions of use, which together with our privacy policy govern our relationship with you in relation to this application."
}
}
}
}When to use
- When there is a small amount of content to show to the user that is purely informational.
When not to use
- When the content is more complex and requires user interaction, or validation from the server. Consider using a Subflow instead.
| Property | Type | Required | Description |
|---|---|---|---|
analyticsId | String | No | An optional identifier to be used in analytics tracking. |
content | ModalLayout.Content | Yes | Represents the modal content itself |
control | String | No | Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored. |
margin | Size | No | The vertical margin to apply after this component. Defaults to md. |
| Array<String> | No | An optional list of identifiers used to configure renderers.
|
trigger | ModalLayout.Trigger | Yes | Represents the trigger for the modal content |
type | String | Yes | It must be modal. |
| Property | Type | Required | Description |
|---|---|---|---|
title | String | Yes | The visible title for the trigger |
| Property | Type | Required | Description |
|---|---|---|---|
components | Array<Layout> | Yes | The layout components to appear when triggered |
| String | No | A user-facing title for the modal content block
|