| Crates.io | tailyew |
| lib.rs | tailyew |
| version | 0.1.45 |
| created_at | 2025-04-03 04:26:36.552146+00 |
| updated_at | 2026-01-23 19:19:59.412771+00 |
| description | Reusable Yew + Tailwind UI component library |
| homepage | https://tailyew.com/ |
| repository | https://github.com/apjames93/tailyew |
| max_upload_size | |
| id | 1617652 |
| size | 346,817 |
A modern, reusable component library for Yew apps β powered by Tailwind CSS and written fully in Rust.
TailYew helps you build fast, beautiful, dark-mode ready Yew apps β with minimal styling effort.
π§ͺ Dogfooded in production
The TailYew demo site and documentation at tailyew.com are built entirely with TailYew itself. We actively dogfood the library to validate APIs, accessibility, and real-world usage as the system evolves.
dark: utilitiesTypo, A, Image, CodeBlock) and supports embedded FormBuilder blocksFormBuilder blocks from fenced code like form ... via pulldown-cmarkFormSubmitCallback with loading, error, and success handling built inaria-describedby supportπ Explore live examples π https://tailyew.com/demo/getting_started
TailYew (v0.1.43) has been updated to support Yew 0.22, including:
#[component] macroIf you are upgrading from Yew 0.21:
π Official guide: https://yew.rs/docs/next/migration-guides/yew/from-0_21_0-to-0_22_0
Starting with TailYew v0.1.43, new releases target Yew 0.22+.
Projects still on Yew 0.21 should pin TailYew to <= 0.1.42
No further features will be added for Yew 0.21
TailYew includes 50+ components. Below is a summary of a few key componentsβ see the full demo here Β»
Button, Input, Textarea, Typo, Checkbox, SelectModalButton, Popover, Accordion, Stepper, Markdown, NotificationTable, Form, NavBar, Sidebar, Card, HeroHeaderBarChart, LineChart, BubbleChart, PieChart, ScatterPlotForm and FormBuilder with fully composable inputs, modal support, and accessible feedbackSee all live: https://tailyew.com
If you like this project, consider giving it a β β it helps others discover TailYew!
We now provide a zero-config CLI to bootstrap a TailYew SPA in seconds:
# 1) Install the scaffolding tool
cargo install create-tailyew-app
# 2) Scaffold your project (this creates `my-app/` for you)
create-tailyew-app my-app
# 3) Change into it
cd my-app
# 4) Install prerequisites (once)
rustup target add wasm32-unknown-unknown
cargo install trunk
npm install
# 5) Start the dev server (Trunk)
make run-frontend
Youβll get:
Makefile with dev commands: run-frontend, pretty, and moreIn your Cargo.toml:
tailyew = "0.1.44" # Yew 0.22 compatible
Tailwind CSS uses static analysis to determine which classes to include in your final CSS bundle. Since TailYew applies some classes dynamically, you must safelist them.
TailYew includes a tailyew-safelist.html file that lists all runtime classes. Add it to your tailwind.config.js:
module.exports = {
darkMode: 'class',
content: [
'./**/**/*.{html,js,rs}',
'./static/tailyew-safelist.html',
],
};
To copy the safelist file into your project:
mkdir -p vendor/tailyew
cp ~/.cargo/registry/src/*/tailyew-*/tailyew-safelist.html static/
You can also manually define all TailYew utility classes in the safelist key inside tailwind.config.js. This approach is more error-prone and not recommended unless you're customizing heavily.
# Install TailYew
cargo add tailyew
# Copy the safelist
cp ~/.cargo/registry/src/*/tailyew-*/tailyew-safelist.html static/
# Update Tailwind config
// tailwind.config.js
content: [
'./**/**/*.{html,js,rs}',
'./static/tailyew-safelist.html',
]
# Run your app
TailYew is committed to accessible UI components:
aria-label, aria-describedby, and semantic labels| Goal | Status |
|---|---|
| π§Ή Atomic Components | β Atoms β Molecules β Organisms |
| βοΈ Yew-Native Rust Code | β No JavaScript needed |
| π¨ Tailwind-First Styling | β Utility-first classes |
| π Dark Mode Friendly | β Fully supported |
| π Typed Prop APIs | β Rust ergonomics |
crates/tailyew/
βββ src/
β βββ atoms/ # Low-level UI primitives (Button, Input, etc.)
β βββ molecules/ # Combined components (Form, ModalButton, etc.)
β βββ organisms/ # Full page structures (Navbar, Footer, Table)
β βββ charts/ # Canvas-based charts
β βββ form/ # Form helpers and layout
β βββ lib.rs # Top-level exports
βββ Cargo.toml # Crate config
βββ Makefile # Dev commands (build, release-check, docs)
βββ tailyew-safelist.html # β¨ Tailwind runtime classes (critical)
We welcome contributions! β€οΈ
Ways you can help:
Before submitting a PR:
make release-checkπ Thank you for helping grow the Rust UI ecosystem!
MIT License β see LICENSE