MCPcopy Index your code
hub / github.com/adoyle0/singlestage-ui

github.com/adoyle0/singlestage-ui @v0.4.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.4.1 ↗ · + Follow
412 symbols 492 edges 472 files 9 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Singlestage UI

A familiar UI library for Leptos made with Tailwind CSS, and based on Basecoat, shadcn/ui, and Radix.

https://singlestage.doordesk.net

Introduction

Singlestage takes the familiar styling of Radix and shadcn/ui and brings it to Leptos. It takes a modular approach, meaning every component is feature flagged so you can take as much or as little as you need.

Each component tries to stay lean, using semantic HTML elements, modern APIs, and CSS instead of Rust code wherever possible. This keeps WASM binaries small while staying current with emerging accessibility features.

Features

  • Conforms to modern web standards
  • WAI-ARIA compliant
  • Focused on minimalism, modularity, and performance
  • Feature flagged components
  • Modular theme system
  • Dark mode that just works
  • Arbitrary theme support
  • HTML-like API

Install

Add singlestage with cargo: cargo add singlestage

Or add singlestage to your Cargo.toml:

# Cargo.toml

[dependencies]
leptos = "0.8"
...
singlestage = "0.4"

Nightly

# Cargo.toml
[dependencies]
leptos = { version = "0.8", features = ["nightly"] }
...
singlestage = { version = "0.4", features = ["nightly"] }

Add the nightly feature to singlestage just as you do with Leptos, if using nightly.

Islands

Add the islands feature to singlestage just as you do with Leptos, if using islands.

# Cargo.toml

[dependencies]
leptos = { version = "0.8", features = ["islands"] }
...
singlestage = { version = "0.4", features = ["islands"] }

SSR

Nothing special needs to happen whether you you use SSR or not.

Reactive Stores

Add the stores feature to singlestage if you're using reactive stores. This will enable using store Fields as Reactive values.

# Cargo.toml

[dependencies]
leptos = "0.8"
...
reactive_stores = "0.3"
singlestage = { version = "0.4", features = ["stores"] }

Tailwind BYOB

Singlestage uses tailwind during the build process. It first checks for tailwindcss in PATH (system install, typical for Linux). If that doesn't work then it tries to download the latest tailwind binary from their github release page. If for some reason this fails, or for whatever reason you want to use your own tailwind executable, you can bring your own binary by setting the SINGLESTAGE_TAILWIND_PATH environment variable to the full path (from root) to your tailwind binary. Note that if you download the binary from github on Linux or MacOS then you'll probably have to make it executable (chmod +x).

SINGLESTAGE_TAILWIND_PATH=/path/to/tailwindcss cargo leptos watch

Contributing

Contributions are welcome.

Core symbols most depended-on inside this repo

get_untracked
called by 79
singlestage/src/reactive.rs
set
called by 63
singlestage/src/reactive.rs
get
called by 34
singlestage/src/reactive.rs
update
called by 7
singlestage/src/reactive.rs
Field
called by 5
singlestage/src/components/field/field.rs
run_tailwind
called by 4
singlestage/build.rs
parse
called by 3
singlestage_macro/src/icon.rs
highlight_html_from_file
called by 2
docs_macro/src/highlight.rs

Shape

Function 364
Class 34
Method 12
Enum 2

Languages

Rust100%

Modules by API surface

docs_macro/src/lib.rs13 symbols
singlestage/src/reactive.rs9 symbols
docs/src/components/component_template.rs6 symbols
singlestage/src/components/sidebar/mod.rs5 symbols
singlestage/build.rs4 symbols
singlestage_macro/src/icon.rs3 symbols
singlestage/src/components/theme_provider/mode.rs3 symbols
singlestage/src/components/theme_provider/mod.rs3 symbols
singlestage/src/components/dropdown/mod.rs3 symbols
docs/src/components/sidebar.rs3 symbols
docs/src/app.rs3 symbols
singlestage/src/components/sidebar/collapsible/collapsible.rs2 symbols

For agents

$ claude mcp add singlestage-ui \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact