11 releases
new 0.1.10 | Apr 17, 2025 |
---|---|
0.1.9 | Apr 13, 2025 |
#143 in GUI
1,179 downloads per month
170KB
4.5K
SLoC
π TailYew
A modern, reusable component library for Yew apps β powered by Tailwind CSS and built in Rust.
TailYew helps you ship fast, beautiful Yew apps using fully-styled, accessible components with dark mode, markdown rendering, charts, modals, and form elements β all built in idiomatic Rust.
π§© Component Highlights
TailYew comes with battle-tested components including:
- β Forms β Input, Select, Checkbox, JSON, Phone, File
- π Charts β LineChart, BubbleChart (canvas-based)
- π§ͺ Modals, Accordions, AppBar, Tabs
- π Markdown β Parse + sanitize with
pulldown-cmark
andammonia
- βοΈ Clipboard, Notifications, Popover, Section, and more
- π Dark mode ready β with Tailwindβs
dark:
utilities
π See them all at π https://tailyew.com/demo/getting_started
πΈ Preview
Explore TailYewβs live components, props, and code samples:
π https://tailyew.com
π Get Started in 5 Minutes
...if you already have all the dependencies, a stable toolchain, and emotionally prepared for Rust
β Option 1: Use the Starter Template (Recommended)
git clone https://github.com/apjames93/tailyew-starter my-app
cd my-app
cargo install wasm-pack cargo-watch
brew install binaryen
npm install # for local deps tailwindcss cli and serve
make hot-run
Then open π http://localhost:8080
This gives you hot reloading, built-in Tailwind support, and access to every TailYew component.
π¦ Using TailYew as a Crate (without starter)
Add to your Cargo.toml
:
tailyew = "0.1.2"
π¨ Tailwind Setup (Important!)
Tailwind uses static analysis to detect classes. To expose classes from TailYew's crate, we have the make comand:
make copy-tailyew
This copies crates/tailyew
into your appβs vendor/
directory so Tailwind includes all component class usage.
This is ran with make run-frontend
Make sure your tailwind.config.js
includes the path:
content: [
"./src/**/*.rs", // <---- for other components that you will build in your project
"../crates/tailyew/src/**/*.rs", // <-- for TailYew usage
],
Then use in your app:
use tailyew::atoms::Button;
html! {
<Button>{ "Click Me!" }</Button>
}
ποΈ Project Goals
- π‘ Atomic Design β Atoms β Molecules β Organisms
- βοΈ Yew-Native β Fully idiomatic Rust, zero JavaScript
- π¨ Tailwind-First β Utility classes, theming, dark mode
- π Composable APIs β Clean prop-driven ergonomics
- π§ͺ Developer Experience β Hot reload, clear docs, consistent props
π Folder Structure
crates/tailyew/
βββ src/
β βββ atoms/ # Buttons, Inputs, etc.
β βββ molecules/ # Modals, Forms, Selects
β βββ organisms/ # Full blocks like Nav, Footer
β βββ charts/ # Canvas-based charts (optional)
β βββ form/ # Form layout + state helpers
β βββ icons/ # Reusable SVGs
β βββ lib.rs # Exports all public components
βββ Makefile # Dev commands (build, docs, hot reload)
βββ Cargo.toml # Rust crate config
βββ README.md # You're here
π€ Contributing
TailYew is an open source project β and weβd love your help!
β¨ Ways to Contribute
- Submit a feature request or improvement idea
- Report bugs or visual issues
- Build new components or improve styling
- Add or update documentation and demos
β Contribution Checklist
Before submitting a pull request:
- Make sure
make release-check
passes - If it's a visual/UI change, include before/after screenshots
- Update or add related demo pages in
frontend/src/pages/
- Test in both light mode and dark mode
π Helpful Links
- π₯ Open a Pull Request
- π Report a Bug
- π‘ Propose a Feature
π Thank you for helping grow the Rust UI ecosystem!
π Related
- π¦ Yew Framework
- π¨ Tailwind CSS
- π TailYew Starter
Dependencies
~17β27MB
~399K SLoC