tailyew 0.1.2

Reusable Yew + Tailwind UI component library
Documentation

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


πŸ“Έ Preview

Explore TailYew’s live components, props, and code samples:
πŸ‘‰ https://tailyew.com


πŸš€ Get Started in 2 Minutes

βœ… Option 1: Use the Starter Template (Recommended)

git clone https://github.com/apjames93/tailyew-starter my-app
cd my-app
make run-frontend

Then open πŸ‘‰ http://localhost:8080

This gives you hot reloading, built-in Tailwind support, and access to every TailYew component.


πŸ› οΈ Install Tooling

You'll need a mix of Rust + JS tooling:

Rust CLI tools:

cargo install wasm-pack cargo-watch
brew install binaryen

JavaScript tools:

npm install

Installs tailwindcss and dev tools (e.g. serve)


🎨 Tailwind Setup (Important!)

Tailwind uses static analysis to detect classes. To expose classes from TailYew's crate, run:

make copy-tailyew

This copies crates/tailyew into your app’s vendor/ directory so Tailwind includes all component class usage.


βš™οΈ Run the App

make run-frontend

This watches both Tailwind + Yew code for hot reloading using cargo-watch.


πŸ“¦ Using TailYew as a Crate (without starter)

Add to your Cargo.toml:

tailyew = "0.1.2"

Make sure your tailwind.config.js includes the path:

content: [
  "./src/**/*.rs",
  "../crates/tailyew/src/**/*.rs", // <-- for TailYew usage
],

Then use in your app:

use tailyew::atoms::Button;

html! {
  <Button>{ "Click Me!" }</Button>
}

🧩 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


πŸ—οΈ 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

πŸ”— Related


Looking to build a full Yew app with Markdown, forms, charts, and SSR-ready UI blocks? TailYew is your foundation.