8000 GitHub - longbridge/nsh-longbridge: A component library for NSH (Native Shell) apps: one Rust implementation for TSX and Rust apps, with a neutral look customizable through design tokens. · GitHub
[go: up one dir, main page]

Skip to content

About

A component library for NSH (Native Shell) apps: one Rust implementation for TSX and Rust apps, with a neutral look customizable through design tokens.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Repository files navigation

nsh-longbridge

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.

Install

nsh add github:longbridge/nsh-longbridge
import { 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).

Agent skill

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-longbridge

Platforms

The 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.

Customize

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/.

Documentation

  • 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

License

Copyright 2026 Longbridge. Licensed under the Apache License, Version 2.0.

Acknowledgments

The default look and the theme variables' names draw on shadcn/ui (MIT), so its themes can be used as theme files here.

About

A component library for NSH (Native Shell) apps: one Rust implementation for TSX and Rust apps, with a neutral look customizable through design tokens.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

0