Calm motion: animations on this site only fade, with no movement
Eligibility check
Questions one at a time that lead to a result, with a way back
Tells a person if they can apply for a service before they start a long form. A short check saves their time and the time of your staff.
Basic
questionsis the list of questions. The first one is the start. Each question has anid, atext, an optionalhint, andoptions.- Each option has a
labeland anextid. The next id is another question or an outcome. outcomesis the list of results. Each has anid, atitle, an optionalbody,eligible, and an optional link withhrefandcta.- One question shows at a time, as a group of radio buttons. Continue without a choice shows an error.
- After each step, the focus moves to the new question or the result, so screen readers read it.
- Back goes to the question before, with its answer still chosen. The result says "You can apply" or "You cannot apply", and it has Back and Start again.
- Questions can load after the check shows. The check then starts at the first question.
- At a result, the check emits
resultwith the outcome id and the answers by question id. - Change the words with
labelsor a label pack. The API table lists the keys.
Usage
ts
import { BlessEligibilityCheck } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
questions* | BlessEligibilityQuestion[] | — | the first question in the list is the start |
outcomes* | BlessEligibilityOutcome[] | — | |
labels | Partial<{ question: (n: number) => string; next: string; back: string; restart: string; pick: string; yes: string; no: string; }> | — |
Events
| Name | Payload | Description |
|---|---|---|
result | [outcome: string, answers: Record<string, string>] |