Native apps that look finished from day one.
39 components for NSH apps, in TSX or Rust. One theme file restyles every one of them.
Browse components
$
nsh add github:longbridge/nsh-longbridgeOne file restyles all of it.
Every radius, size and color is a token. Move one and every component that reads it follows.
{ "cssVars": { "theme": { "radius": "10px", "control-height": "32px", "font-size": "14px" } }}Write it once.
A component is a function in TSX. The card beside the file is that file, running: type an email and Send invite wakes up.
SOURCE
export function InviteCard() { const email = signal(""); return ( <Card> <CardHeader> <CardTitle><Text>Invite a teammate</Text></CardTitle> <CardDescription><Text>They join every project.</Text></CardDescription> </CardHeader> <CardContent class="gap-2"> <Label><Text>Email</Text></Label> <Input placeholder="ada@northwind.dev" value={email()} onChange={(e) => email.set(e.value)} /> </CardContent> <CardFooter class="justify-end gap-2"> <Button variant="outline"><Text>Cancel</Text></Button> <Button disabled={!email().includes("@")}><Text>Send invite</Text></Button> </CardFooter> </Card> );}RUNNING
39 components.
Each with its own page: the variants, the states and the tokens it reads.
Actions
- ButtonSix variants, four sizes, icons.
- CommandA command palette: search, then run.
- Context MenuThe actions of a row, at the pointer.
- Dropdown MenuCommands and settings in a menu.
- PaginationMoves through the pages of a list.
- Selection BarWhat to do with the items picked.
- TabsViews of one page, one at a time.
- ToggleA button that stays on or off.
- Toggle GroupA set of toggles, one or several on.
Forms
- CalendarA month to pick a day or a range in.
- CheckboxOn, off or mixed, with its label.
- ComboboxFilters a long list as you type.
- Date PickerA field that opens a calendar.
- FieldLabel, control, help and error.
- InputOne line of text, in all its states.
- Input GroupAn input with icons, text or buttons inside.
- LabelNames a control; a press focuses it.
- Radio GroupOne choice of a few, all in view.
- SelectOne choice from a list, searchable.
- SliderA value or a range along a track.
- SwitchA setting that takes effect at once.
- TextareaLines of text that grow as you type.
Overlays
Display
- AvatarA face or initials, alone or grouped.
- BadgeA small pill for a status or a count.
- CardA surface with header, body, actions.
- Data TableSort, select and resize columns.
- KbdA key or a shortcut: ⌘K, Ctrl+K.
- ProgressHow far along a task is.
- SeparatorA hairline between groups of content.
- ShimmerWords that shimmer while the app waits.
- SkeletonThe shape of content while it loads.
- SpinnerWork under way, with no known end.
- TableRows and columns the app writes.