11 releases

new 0.1.10 Apr 17, 2025
0.1.9 Apr 13, 2025

#143 in GUI

Download history 192/week @ 2025-03-30 676/week @ 2025-04-06 311/week @ 2025-04-13

1,179 downloads per month

MIT license

170KB
4.5K SLoC

Crates.io Docs.rs License

🌟 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 and ammonia
  • βœ‚οΈ 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

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


πŸ™Œ Thank you for helping grow the Rust UI ecosystem!



Dependencies

~17–27MB
~399K SLoC