Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

States

Read, edit, saving, error and the risky confirmation.

read
Invoice numbering
INV-0042
edit
Invoice numbering

Was INV-0042

saving
Invoice numbering

Was INV-0042

error
Invoice numbering

Was INV-0042

edit-disabled-reason
Currency
INR
confirm with a typed word
Zoho Books writes

Was Off

Start writes to Zoho Books?

  • WritesWas OffNow On

Invoices start posting to the live book.

Only one row open
Edit is greyed on the other rows while a row is open.

Invoicing

How invoices are numbered and sent

Invoice numbering

Was INV-0042

Currency
INR
Show code
<app-setting-section title="Invoicing" description="How invoices are numbered and sent">
    <app-setting-row label="Invoice numbering" value="INV-0042" mode="Edit"><app-input label="Next number" name="nextNumber" value="INV-0042" /></app-setting-row>
    <app-setting-row label="Currency" value="INR" edit-disabled-reason="Finish the open row first" />
</app-setting-section>

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

Do
Invoice numbering
INV-0042

The value reads as text, so a person sees the setting before they open it.

Avoid
Invoice numbering

A setting with no value leaves a person to guess what it is set to.

Warn before a risky change

Do
Zoho Books writes

Was Off

A change that starts or stops writes to a live system opens the warning panel and asks for a typed word.

Avoid
Zoho Books writes

Was Off

Without the warning panel a person does not see what they change before it saves.

Keep a refused save in the row

Do
Invoice numbering

Was INV-0042

A refused save stays in the row, beside the typed value, so the person can correct it where they are.

Avoid
Invoice numbering

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.

read edit
Invoice numbering

The number of the next invoice

INV-0042
React, generated from the controls
<AppSettingRow label="Invoice numbering" description="The number of the next invoice" value="INV-0042">
  <AppSwitch label="Writes enabled" name="writes" />
</AppSettingRow>
Razor, the same props
<app-setting-row label="Invoice numbering" description="The number of the next invoice" value="INV-0042">
    <app-switch label="Writes enabled" name="writes" />
</app-setting-row>

9 props. The 5 most used come first.

Used on most screens 5 props

PropTypeDefaultDescription
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

PropTypeDefaultDescription
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 pairs

Give each setting its current value

Do
Invoice numbering
INV-0042

The value reads as text, so a person sees the setting before they open it.

Avoid
Invoice numbering

A setting with no value leaves a person to guess what it is set to.

Warn before a risky change

Do
Zoho Books writes

Was Off

A change that starts or stops writes to a live system opens the warning panel and asks for a typed word.

Avoid
Zoho Books writes

Was Off

Without the warning panel a person does not see what they change before it saves.

Keep a refused save in the row

Do
Invoice numbering

Was INV-0042

A refused save stays in the row, beside the typed value, so the person can correct it where they are.

Avoid
Invoice numbering

Was INV-0042

A refused save shown in a toast leaves the row, and the typed value, behind.