Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Step states

Mark each step done, skipped or to do, so a new user sees what is left and where to go next.

Two of four done
  1. Done: Add your company
  2. Invite your teamUp to 5 people on the trial
  3. Skipped: Connect email
  4. Create your first invoice
Show code
<app-onboarding-checklist title="Set up Acme">
    <app-onboarding-step label="Add your company" status="OnboardingStatus.Done" href="/settings/company" />
    <app-onboarding-step label="Invite your team" description="Up to 5 people on the trial" href="/team" />
    <app-onboarding-step label="Connect email" status="OnboardingStatus.Skipped" />
    <app-onboarding-step label="Create your first invoice" href="/invoices/new" />
</app-onboarding-checklist>

Complete

Once every step is done or skipped, the card starts folded, so a finished setup stops taking up the screen.

All set
Show code
<app-onboarding-checklist>
    <app-onboarding-step label="Add your company" status="OnboardingStatus.Done" href="/settings/company" />
    <app-onboarding-step label="Invite your team" status="OnboardingStatus.Done" href="/team" />
    <app-onboarding-step label="Connect email" status="OnboardingStatus.Skipped" />
    <app-onboarding-step label="Create your first invoice" status="OnboardingStatus.Done" href="/invoices/new" />
</app-onboarding-checklist>

Dismiss and restore

Dismiss the checklist to a single button that brings it back, and give each one a storage key to keep the choice.

Remembered across visits
Show code
<app-onboarding-checklist storage-key="crm-onboarding" default-dismissed="true">
    <app-onboarding-step label="Add your company" status="OnboardingStatus.Done" href="/settings/company" />
    <app-onboarding-step label="Invite your team" description="Up to 5 people on the trial" href="/team" />
    <app-onboarding-step label="Connect email" status="OnboardingStatus.Skipped" />
    <app-onboarding-step label="Create your first invoice" href="/invoices/new" />
</app-onboarding-checklist>

Every option

Every value of every prop, one cell each.

steps: status, all four

status="todo" (default)
  1. Choose a plan
  2. Add your company
status="done"
status="current"
  1. Add your company
status="skipped"

steps: label, description and href

label: what to do, required
  1. Invite your team
description: a second line under the label
  1. Invite your teamUp to 5 people on the trial
href: the label becomes a link
  1. Connect email

title

title="Get started" (default)
  1. Add your company
title="Set up Acme"
  1. Add your company

defaultCollapsed

default-collapsed unset (default): folds when all done
default-collapsed="false"
  1. Done: Add your company
  2. Invite your team
default-collapsed="true"

defaultDismissed

default-dismissed="false" (default)
  1. Add your company
default-dismissed="true"

storageKey

storage-key="every-option": remembers a dismissal
  1. Add your company

dismissLabel and restoreLabel

dismiss-label="Close setup": names the close icon
  1. Add your company
restore-label="Bring it back": the restore button text

callbacks: onClose, onRestore and onCollapsedChange

onClose (React only): raises wui:onboarding:dismiss
  1. Add your company
onRestore (React only): raises wui:onboarding:restore
  1. Add your company
onCollapsedChange (React only): raises wui:onboarding:collapse
  1. Add your company

linkComponent

linkComponent (React only): steps take href
  1. Connect email

className

className (React only): Razor sets no root class
  1. Add your company

Guidance

What to do, and what to avoid.

Use it when

  • A new user's first visit, where a few setup steps unlock the product.
  • Setup that spans several screens and may be done in any order.

Reach for something else when

  • A strict sequence the user must follow in one flow. → AppStepper or AppWizard
  • A guided walk over one screen's controls. → AppTour

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

Just started Half way Complete
auto expanded collapsed
  1. Done: Add your companyName, GSTIN and address
  2. Invite your teamUp to 5 people on the trial
  3. Skipped: Connect email
  4. Create your first invoice
React, generated from the controls
<AppOnboardingChecklist steps={steps} />
Razor, the same props
<app-onboarding-checklist>…</app-onboarding-checklist>

10 props. The 4 most used come first.

Used on most screens 4 props

PropTypeDefaultDescription
titledefault Get started string Get started The heading, and the name of the progress bar.
default-collapseddefault - bool - Whether the steps start collapsed. Unset, they start collapsed when every step is done or skipped.
default-dismisseddefault false bool false Whether the checklist starts dismissed, showing only the restore button.
storage-keydefault - string - Remembers a dismissal across visits under this key, one per checklist. Unset, the dismissal lasts the page.

Less common 6 props

PropTypeDefaultDescription
dismiss-labeldefault Dismiss checklist string Dismiss checklist The name and tooltip of the close icon.
restore-labeldefault Show setup checklist string Show setup checklist The text of the button that brings a dismissed checklist back.
(app-onboarding-step) labeldefault - string - What to do ("Invite your team").
(app-onboarding-step) descriptiondefault - string - A secondary line under the label.
(app-onboarding-step) hrefdefault - string - Makes the label a link to where the step is done.
(app-onboarding-step) statusdefault todo done | current | skipped | todo todo The step's state. With none current, the first step to do is.

Screen reader

5 notes
  • The card is named by its title, and the progress bar is named by the same title.
  • The heading toggle sets aria-expanded and aria-controls, so a screen reader hears whether the steps are open.
  • The progress bar is a progressbar whose value is the number of steps done, read as a count such as 2 of 4 done.
  • A step that is done or skipped is read out as Done or Skipped before its label, so the mark alone carries no state.
  • The current step carries aria-current set to step.