Opens a modal when the behavior is triggered.
button {
control = "primary"
title = "Card details"
behavior = ModalBehavior.build {
title = "Card details"
content {
review {
fields {
field {
label = "Cardholder name"
value = "Emmett Brown"
callToAction {
title = "Copy"
behavior = CopyBehavior.build {
content = "Emmett Brown"
}
}
}
field {
label = "Card number"
value = "0118 0135 2610 1985"
callToAction {
title = "Copy"
behavior = CopyBehavior.build {
content = "0118 0135 2610 1985"
}
}
}
field {
label = "Expiry date"
value = "10/85"
callToAction {
title = "Copy"
behavior = CopyBehavior.build {
content = "10/85"
}
}
}
field {
label = "Security code"
value = "088"
callToAction {
title = "Copy"
behavior = CopyBehavior.build {
content = "088"
}
}
}
field {
label = "Billing address"
value = "1646 Riverside Drive, Hill Valley, CA 95420, United States"
}
}
}
}
}
}| Property | Type | Required | Description |
|---|---|---|---|
content | Array<Layout> | Yes | The content which should be displayed within the modal. Please note that we discourage the use of form components within modals as this can lead to an undesirable user experience with validation. |
title | String | No | The user-facing title of the modal. |
type | String | Yes | It must be modal. |