A list of fields used to inform the user of actions to do and not do.
instructions {
items {
item {
text = "Make an initial money transfer"
context = Context.POSITIVE
}
item {
text = "Pay extra hidden fees for transfers"
context = Context.NEGATIVE
}
}
}When to use
- When providing a list of things the user should and should not do, for example, when creating a password, DO use something unique, with special characters. DON'T use your date of birth.
When not to use
- When building a list of items which have positive/negative sentiments but are not instructions, consider using a Status List Layout instead. For example, a list of features which are and aren't included in a subscription.
| Property | Type | Required | Description |
|---|---|---|---|
analyticsId | String | No | An optional identifier to be used in analytics tracking. |
control | String | No | Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored. |
items | Array<InstructionsLayout.Item> | Yes | An array of instructions. |
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.
|
title | String | No | A user-facing title. |
type | String | Yes | It must be 'instructions'. |
A single instruction in an Instructions Layout
| Property | Type | Required | Description |
|---|---|---|---|
analyticsId | String | No | An optional identifier to be used in analytics tracking. |
context | Context | Yes | The semantics of the instruction. |
| String | No | An optional identifier to be used in custom renderers.
⚠️ Deprecated - Please use 'tags' instead |
| Array<String> | No | An optional list of identifiers used to configure renderers.
|
text | String | Yes | The user-facing text for the instruction. |