Skip to content

adoyle0/singlestage-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Singlestage UI

A familiar UI library for Leptos made with Tailwind CSS, 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.3"

Nightly

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

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

SSR

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

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.

About

A familiar UI library for Leptos.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project