A component library for NSH apps: a neutral look on nsh/base's behavior, one
Rust implementation for TSX and Rust apps, customizable through design tokens.
See every component, and make a theme, in the gallery.
nsh add github:longbridge/nsh-longbridgeimport { Button } from "nsh-longbridge";
<Button variant="outline">Save</Button>;Rust apps depend on the crate (nsh-longbridge = { git = "https://github.com/longbridge/nsh-longbridge" }) and
use nsh_longbridge::*.
It requires NSH 0.8. Within 0.1.x the public API only grows, but for one recorded change: press events carry a
PressEvent (see CHANGELOG.md for the migration).
Coding agents building an app with this library get its skill, which works alongside NSH's own: which component to use, how to compose, theme and test them.
npx skills add longbridge/nsh-longbridgeThe web and the desktops first: reviewed on macOS, built and spot-checked on Windows and Linux. Sizes have pointer and touch values throughout; phones are reviewed later.
Every look is a token. Seed tokens (radius, spacing, control-height, font-size, duration) reshape every
component in proportion, semantic tokens (primary, border) restyle a role, and component tokens (button-radius)
one kind of component. ThemeScope themes part of a screen (provide_theme_scope does it without a view, for Rust
components that wrap these); class and style reach a single instance. A token left unset derives from the tier
below, so hover, press and focus states follow a changed color. Theme files are in themes/.
- Components: find one by what it is for; each has a spec
- Tokens: the tiers, the names and how values derive
- Conventions: how a component is built and drawn
- API design: the rules of the public API, and what is breaking
- Why Rust: why the library is Rust and not TSX, what it costs, and when to revisit
gallery/: an app showing every component in light and dark, with its tokens editable live
Copyright 2026 Longbridge. Licensed under the Apache License, Version 2.0.
The default look and the theme variables' names draw on shadcn/ui (MIT), so its themes can be used as theme files here.