Skip to content

Onboarding checklist

A new starter’s first-week checklist, with a second page introducing the people to meet. It uses no business object: everything is document state, setState and conditions, so it works in any host with no wiring beyond page routing.

  • Mark steps done and undo them; each card swaps its button and shows ✓ Done.
  • Finish all four steps. The You’re all set banner appears.
  • Press Who should I meet? to switch pages, and come back.
{
"state": {
"steps": {
"laptop": false,
"accounts": false,
"handbook": false,
"buddy": false
}
}
}

A step’s Mark done button shows while its flag is false and sets it to true; Undo and the done marker show while it is true:

{
"step-laptop-done": {
"type": "Text",
"props": {
"content": "✓ Done",
"size": "md",
"tone": "accent",
"align": "left",
"italic": false
},
"children": [],
"visible": {
"$state": "/steps/laptop",
"eq": true
}
},
"step-laptop-mark": {
"type": "Button",
"props": {
"label": "Mark done",
"variant": "solid",
"size": "sm",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "setState",
"params": {
"statePath": "/steps/laptop",
"value": true
}
}
},
"visible": {
"$state": "/steps/laptop",
"eq": false
}
},
"step-laptop-undo": {
"type": "Button",
"props": {
"label": "Undo",
"variant": "ghost",
"size": "sm",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "setState",
"params": {
"statePath": "/steps/laptop",
"value": false
}
}
},
"visible": {
"$state": "/steps/laptop",
"eq": true
}
}
}

The banner’s visible is a list, and a list means all of these:

{
"visible": [
{
"$state": "/steps/laptop",
"eq": true
},
{
"$state": "/steps/accounts",
"eq": true
},
{
"$state": "/steps/handbook",
"eq": true
},
{
"$state": "/steps/buddy",
"eq": true
}
]
}

The four steps are written out one by one, each with its own Mark done and Undo Buttons. A row of a list generated with repeat can now carry its own tick instead: a Toggle bound with $bindItem to the row’s field, as the workshop sign-up talks list does. The all-done banner still needs one flag per step: showing it is a decision on how many steps are done, and a document’s calculations ($calc) are for display only, never read by a condition. Progress is not saved anywhere either: state lives only as long as the host’s session, unless the host persists it.

Complete document — examples/documents/onboarding-checklist.json
examples/documents/onboarding-checklist.json
{
"envelopeVersion": 1,
"ui": {
"root": "app",
"elements": {
"app": {
"type": "PageStack",
"props": {
"name": "Onboarding checklist"
},
"children": [
"page-week",
"page-people"
]
},
"page-week": {
"type": "Page",
"props": {
"title": "Week one",
"background": "mist"
},
"children": [
"week-heading",
"week-copy",
"steps",
"all-done",
"to-people"
]
},
"week-heading": {
"type": "Heading",
"props": {
"content": "Welcome aboard",
"level": "1",
"align": "left",
"accent": true
},
"children": []
},
"week-copy": {
"type": "Text",
"props": {
"content": "Four things to finish this week. Mark each one as you go.",
"size": "lg",
"tone": "muted",
"align": "left",
"italic": false
},
"children": []
},
"steps": {
"type": "Grid",
"props": {
"columns": 2,
"gap": "md",
"padding": "none",
"minCellWidth": 240
},
"children": [
"step-laptop",
"step-accounts",
"step-handbook",
"step-buddy"
]
},
"all-done": {
"type": "Section",
"props": {
"eyebrow": "WEEK ONE COMPLETE",
"title": null,
"tone": "ink",
"padding": "xl"
},
"children": [
"all-done-heading",
"all-done-copy"
],
"visible": [
{
"$state": "/steps/laptop",
"eq": true
},
{
"$state": "/steps/accounts",
"eq": true
},
{
"$state": "/steps/handbook",
"eq": true
},
{
"$state": "/steps/buddy",
"eq": true
}
]
},
"all-done-heading": {
"type": "Heading",
"props": {
"content": "You're all set",
"level": "2",
"align": "left",
"accent": true
},
"children": []
},
"all-done-copy": {
"type": "Text",
"props": {
"content": "Your manager can see you finished week one.",
"size": "md",
"tone": "inverse",
"align": "left",
"italic": false
},
"children": []
},
"to-people": {
"type": "Button",
"props": {
"label": "Who should I meet?",
"variant": "outline",
"size": "md",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "goToPage",
"params": {
"page": "page-people"
}
}
}
},
"page-people": {
"type": "Page",
"props": {
"title": "People",
"background": "paper"
},
"children": [
"people-heading",
"people-grid",
"back-week"
]
},
"people-heading": {
"type": "Heading",
"props": {
"content": "People to meet",
"level": "1",
"align": "left",
"accent": false
},
"children": []
},
"people-grid": {
"type": "Grid",
"props": {
"columns": 3,
"gap": "md",
"padding": "none",
"minCellWidth": 180
},
"children": [
"person-manager",
"person-buddy",
"person-it"
]
},
"back-week": {
"type": "Button",
"props": {
"label": "Back to the checklist",
"variant": "outline",
"size": "md",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "goToPage",
"params": {
"page": "page-week"
}
}
}
},
"step-laptop": {
"type": "Section",
"props": {
"eyebrow": null,
"title": "Collect your laptop",
"tone": "raised",
"padding": "lg"
},
"children": [
"step-laptop-copy",
"step-laptop-done",
"step-laptop-mark",
"step-laptop-undo"
]
},
"step-laptop-copy": {
"type": "Text",
"props": {
"content": "IT has it ready at the front desk from 9:00.",
"size": "md",
"tone": "muted",
"align": "left",
"italic": false
},
"children": []
},
"step-laptop-done": {
"type": "Text",
"props": {
"content": "✓ Done",
"size": "md",
"tone": "accent",
"align": "left",
"italic": false
},
"children": [],
"visible": {
"$state": "/steps/laptop",
"eq": true
}
},
"step-laptop-mark": {
"type": "Button",
"props": {
"label": "Mark done",
"variant": "solid",
"size": "sm",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "setState",
"params": {
"statePath": "/steps/laptop",
"value": true
}
}
},
"visible": {
"$state": "/steps/laptop",
"eq": false
}
},
"step-laptop-undo": {
"type": "Button",
"props": {
"label": "Undo",
"variant": "ghost",
"size": "sm",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "setState",
"params": {
"statePath": "/steps/laptop",
"value": false
}
}
},
"visible": {
"$state": "/steps/laptop",
"eq": true
}
},
"step-accounts": {
"type": "Section",
"props": {
"eyebrow": null,
"title": "Sign in to your accounts",
"tone": "raised",
"padding": "lg"
},
"children": [
"step-accounts-copy",
"step-accounts-done",
"step-accounts-mark",
"step-accounts-undo"
]
},
"step-accounts-copy": {
"type": "Text",
"props": {
"content": "Email, chat and the HR portal. Your manager sent the invites.",
"size": "md",
"tone": "muted",
"align": "left",
"italic": false
},
"children": []
},
"step-accounts-done": {
"type": "Text",
"props": {
"content": "✓ Done",
"size": "md",
"tone": "accent",
"align": "left",
"italic": false
},
"children": [],
"visible": {
"$state": "/steps/accounts",
"eq": true
}
},
"step-accounts-mark": {
"type": "Button",
"props": {
"label": "Mark done",
"variant": "solid",
"size": "sm",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "setState",
"params": {
"statePath": "/steps/accounts",
"value": true
}
}
},
"visible": {
"$state": "/steps/accounts",
"eq": false
}
},
"step-accounts-undo": {
"type": "Button",
"props": {
"label": "Undo",
"variant": "ghost",
"size": "sm",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "setState",
"params": {
"statePath": "/steps/accounts",
"value": false
}
}
},
"visible": {
"$state": "/steps/accounts",
"eq": true
}
},
"step-handbook": {
"type": "Section",
"props": {
"eyebrow": null,
"title": "Read the team handbook",
"tone": "raised",
"padding": "lg"
},
"children": [
"step-handbook-copy",
"step-handbook-done",
"step-handbook-mark",
"step-handbook-undo"
]
},
"step-handbook-copy": {
"type": "Text",
"props": {
"content": "Twenty minutes, and it answers most first-week questions.",
"size": "md",
"tone": "muted",
"align": "left",
"italic": false
},
"children": []
},
"step-handbook-done": {
"type": "Text",
"props": {
"content": "✓ Done",
"size": "md",
"tone": "accent",
"align": "left",
"italic": false
},
"children": [],
"visible": {
"$state": "/steps/handbook",
"eq": true
}
},
"step-handbook-mark": {
"type": "Button",
"props": {
"label": "Mark done",
"variant": "solid",
"size": "sm",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "setState",
"params": {
"statePath": "/steps/handbook",
"value": true
}
}
},
"visible": {
"$state": "/steps/handbook",
"eq": false
}
},
"step-handbook-undo": {
"type": "Button",
"props": {
"label": "Undo",
"variant": "ghost",
"size": "sm",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "setState",
"params": {
"statePath": "/steps/handbook",
"value": false
}
}
},
"visible": {
"$state": "/steps/handbook",
"eq": true
}
},
"step-buddy": {
"type": "Section",
"props": {
"eyebrow": null,
"title": "Book a coffee with your buddy",
"tone": "raised",
"padding": "lg"
},
"children": [
"step-buddy-copy",
"step-buddy-done",
"step-buddy-mark",
"step-buddy-undo"
]
},
"step-buddy-copy": {
"type": "Text",
"props": {
"content": "Pick any slot this week.",
"size": "md",
"tone": "muted",
"align": "left",
"italic": false
},
"children": []
},
"step-buddy-done": {
"type": "Text",
"props": {
"content": "✓ Done",
"size": "md",
"tone": "accent",
"align": "left",
"italic": false
},
"children": [],
"visible": {
"$state": "/steps/buddy",
"eq": true
}
},
"step-buddy-mark": {
"type": "Button",
"props": {
"label": "Mark done",
"variant": "solid",
"size": "sm",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "setState",
"params": {
"statePath": "/steps/buddy",
"value": true
}
}
},
"visible": {
"$state": "/steps/buddy",
"eq": false
}
},
"step-buddy-undo": {
"type": "Button",
"props": {
"label": "Undo",
"variant": "ghost",
"size": "sm",
"disabled": false,
"fullWidth": false
},
"children": [],
"on": {
"press": {
"action": "setState",
"params": {
"statePath": "/steps/buddy",
"value": false
}
}
},
"visible": {
"$state": "/steps/buddy",
"eq": true
}
},
"person-manager": {
"type": "Section",
"props": {
"eyebrow": null,
"title": null,
"tone": "outlined",
"padding": "lg"
},
"children": [
"person-manager-avatar",
"person-manager-role"
]
},
"person-manager-avatar": {
"type": "Avatar",
"props": {
"name": "Priya Raman",
"imageUrl": null,
"size": "lg",
"status": "online"
},
"children": []
},
"person-manager-role": {
"type": "Text",
"props": {
"content": "Your manager",
"size": "sm",
"tone": "muted",
"align": "left",
"italic": false
},
"children": []
},
"person-buddy": {
"type": "Section",
"props": {
"eyebrow": null,
"title": null,
"tone": "outlined",
"padding": "lg"
},
"children": [
"person-buddy-avatar",
"person-buddy-role"
]
},
"person-buddy-avatar": {
"type": "Avatar",
"props": {
"name": "Tomás Ortega",
"imageUrl": null,
"size": "lg",
"status": "away"
},
"children": []
},
"person-buddy-role": {
"type": "Text",
"props": {
"content": "Your onboarding buddy",
"size": "sm",
"tone": "muted",
"align": "left",
"italic": false
},
"children": []
},
"person-it": {
"type": "Section",
"props": {
"eyebrow": null,
"title": null,
"tone": "outlined",
"padding": "lg"
},
"children": [
"person-it-avatar",
"person-it-role"
]
},
"person-it-avatar": {
"type": "Avatar",
"props": {
"name": "Help desk",
"imageUrl": null,
"size": "lg",
"status": null
},
"children": []
},
"person-it-role": {
"type": "Text",
"props": {
"content": "Laptops and accounts",
"size": "sm",
"tone": "muted",
"align": "left",
"italic": false
},
"children": []
}
},
"state": {
"steps": {
"laptop": false,
"accounts": false,
"handbook": false,
"buddy": false
}
}
},
"meta": {
"pack": {
"id": "mica.core",
"version": "1.0.0"
}
}
}