Step pages
These components draw full-page screens, such as those of the afterSignIn and setupSteps slots. As on Hodi's own screens, the logo is at the top, the licence at the bottom and the card in the middle.
StepPage
A full-page step, outside Hodi's setup, such as a sign-up before signing in. It shows, from top to bottom: a progress bar, a title, a sentence that explains it, the step's fields, then its buttons.
Your first name
Hodi puts it in every greeting.
import { Button, StepPage, TextField } from 'hodi:sdk'
import { Hand } from 'lucide-react'
<StepPage
step={2}
total={3}
title="Your first name"
intro="Hodi puts it in every greeting."
onSubmit={save}
onBack={back}
actions={<Button look="primary" type="submit">Continue</Button>}
>
<TextField
icon={Hand}
aria-label="First name"
value={name}
onChange={e => setName(e.target.value)}
/>
</StepPage>titlestringThe step's title, already translated.
introReactNodeThe sentence under the title, which explains the step.
actionsReactNodeThe buttons on the right of the card's bottom. The main button comes last.
step?numberThe step's number, from 1. With total, it fills the progress bar.
total?numberThe number of steps in all.
onSubmit?() => voidCalled when the person presses Enter in one of the fields, to complete the step.
onBack?() => voidAdds a Back button on the left, which calls this function.
start?ReactNodeOne more button on the left, such as Later.
children?ReactNodeThe step's fields, under the explaining sentence.
TilesPage
A choice screen in round tiles, drawn the way the Who's in? screen draws profiles. Each tile has an icon, or the first letter of its text.
Which household?
Pick the household to open.
© 2026 Hodi · Free software (AGPL-3.0)
import { TilesPage } from 'hodi:sdk'
<TilesPage
title="Which household?"
intro="Pick the household to open."
tiles={households.map(h => ({ key: h.id, label: h.name, onClick: () => open(h.id) }))}
opening={opening}
onBack={back}
/>titlestringThe screen's title, already translated.
tilesTile[]The tiles, in order. A Tile has a key, a label, an onClick and, if needed, a Lucide icon. Without an icon, the tile shows the first letter of its label.
intro?ReactNodeA centred sentence under the title.
opening?string | nullThe key of the tile that is opening. That tile pulses, and the others can't be pressed while waiting.
error?string | nullAn error message, shown under the tiles.
onBack?() => voidAdds a Back button under the tiles, which calls this function.
actions?ReactNodeOther buttons, next to Back.
SetupActions
The buttons at the bottom of a step the plugin adds to Hodi's setup, with setupSteps. Hodi places Back on the left itself; the plugin's buttons go on the right.
import { Button, SetupActions } from 'hodi:sdk'
<SetupActions start={<Button onClick={next}>Later</Button>}>
<Button look="primary" type="submit">Continue</Button>
</SetupActions>childrenReactNodeThe buttons on the right. The main button comes last.
start?ReactNodeOne more button on the left, right after Back.