Files
zeekayandHanzo Dev a8808086f4 hanzo.build's shell is the library's default: the rail, a centred home, settings and catalogue pages
SessionRail draws its head in flow: the brand, which starts a new session,
over a bordered Search box, so a host no longer lays an overlay across the
rail and pads the rows down 92px. The account row reads name over org and
opens the account menu anchored to itself, above it on the open rail and
beside it on the collapsed one. The foot's Settings and Search icons are gone:
search is the head's, settings is a row of the menu. RailNotice is the
offer card over the account, RailBar the phone's header (menu, brand,
search), and every press in the drawer that leads somewhere closes it.

Home is a fresh pane: the mark and the question centred at $8, the composer
under them in one column.

@hanzo/ui/settings is a settings page — a 220px grouped nav from md up, a chip
row below it, a 760 column — and the parts every section is drawn from.
@hanzo/ui/catalog is a catalogue page — kinds as a tablist, Yours/Discover on
the one segmented control, one search and one Add — and its cards on the one
grid. It is its own subpath because that grid is a div: web-only, which the
product layer does not promise.

Every piece is in the gallery, documented under chat, settings and catalog,
unit-tested with axe, and measured by the consumer gate at 390 and 1280 in
both themes.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-27 15:08:56 -07:00

39 lines
1.6 KiB
TypeScript

import { useState } from 'react'
import { YStack } from '@hanzo/gui'
import { Button, Input, Switch } from '@hanzo/ui'
import { Card, Field, Group, Heading, Note, Once, Row, Soft } from '@hanzo/ui/settings'
/** A section — its heading and action, a group over a bordered card of rows, a field, and the note the last action left. */
export function Default() {
const [name, setName] = useState('')
const [note, setNote] = useState('')
return (
<YStack gap="$6" width="100%" maxW={760}>
<Heading title="General" detail="How this surface looks and listens." action={<Button size="sm" onPress={() => setNote('Saved.')}>Save</Button>} />
<Group title="Appearance" detail="Kept in this browser.">
<Card>
<Row first title="Theme" detail="Follows the system." trailing={<Switch aria-label="Dark" />} />
<Row title="hk-live-3f9a" detail="Made Sep 27, 2026" mono trailing={<Button size="sm" variant="outline">Revoke</Button>} />
</Card>
</Group>
<Field label="What should Hanzo call you?" hint="The home page greets you by it.">
<Input value={name} onChangeText={setName} placeholder="Name" aria-label="What should Hanzo call you?" />
</Field>
<Note>{note}</Note>
</YStack>
)
}
/** The quiet lines — empty, signed out — and a credential the platform shows once. */
export function Quiet() {
return (
<YStack gap="$4" width="100%" maxW={760}>
<Card>
<Soft>No keys yet.</Soft>
</Card>
<Soft action={<Button size="sm">Sign in</Button>}>Sign in to see your keys.</Soft>
<Once value="hk-live-3f9a0c71d2" label="API key" />
</YStack>
)
}