On this page
@addTagHelper *, Webority.Ui.RazorStates
Read, edit, saving, error and the risky confirmation.
readeditWas INV-0042
savingWas INV-0042
errorWas INV-0042
edit-disabled-reasonconfirm with a typed wordWas Off
Start writes to Zoho Books?
- WritesWas OffNow On
Invoices start posting to the live book.
Invoicing
How invoices are numbered and sent
Was INV-0042
Guidance
What to do, and what to avoid.
Use it when
- A product setting is read as a value, and a person changes it in place.
- A change is risky and needs a warning and a typed word before it saves.
Reach for something else when
- A form of several fields that a person fills in and submits. → AppFormSection
- The setting is a single on or off switch with no value to read. → AppSwitch
Give each setting its current value
The value reads as text, so a person sees the setting before they open it.
A setting with no value leaves a person to guess what it is set to.
Warn before a risky change
Was Off
A change that starts or stops writes to a live system opens the warning panel and asks for a typed word.
Was Off
Without the warning panel a person does not see what they change before it saves.
Keep a refused save in the row
Was INV-0042
A refused save stays in the row, beside the typed value, so the person can correct it where they are.
Was INV-0042
A refused save shown in a toast leaves the row, and the typed value, behind.
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
9 props. The 5 most used come first.
Used on most screens 5 props
| Prop | Type | Default | Description |
|---|---|---|---|
| labeldefault - | string | - | The setting's name, at the left of the row. |
| descriptiondefault - | string | - | One line of help under the name. |
| badgedefault - | string | - | A small mark beside the name, such as Needs confirming. |
| valuedefault - | string | - | The value as read text; in edit mode it is the Was line. |
| modedefault Read | Read | Edit | Read | Read shows the value with an Edit button; Edit opens the control with Cancel and Save. |
Less common 4 props
| Prop | Type | Default | Description |
|---|---|---|---|
| savingdefault false | bool | false | Makes the control inert and holds the action in its loading state. |
| errordefault - | string | - | A conflict or a failed save. The row stays open with the typed value. |
| confirmingdefault false | bool | false | Opens the warning panel of app-setting-confirm in place of Save. The page holds this state. |
| edit-disabled-reasondefault - | string | - | Greys the Edit button and gives the reason while another row is open. |
Screen reader
2 notes- Edit, Cancel and Save are native buttons; a disabled Edit gives its reason as the tooltip.
- A refused save stays in the row, so the error is read where the person is working.
Do and avoid
3 pairsGive each setting its current value
The value reads as text, so a person sees the setting before they open it.
A setting with no value leaves a person to guess what it is set to.
Warn before a risky change
Was Off
A change that starts or stops writes to a live system opens the warning panel and asks for a typed word.
Was Off
Without the warning panel a person does not see what they change before it saves.
Keep a refused save in the row
Was INV-0042
A refused save stays in the row, beside the typed value, so the person can correct it where they are.
Was INV-0042
A refused save shown in a toast leaves the row, and the typed value, behind.