| Crates.io | tailyew |
| lib.rs | tailyew |
| version | 0.1.38 |
| created_at | 2025-04-03 04:26:36.552146+00 |
| updated_at | 2025-07-04 00:31:20.896749+00 |
| description | Reusable Yew + Tailwind UI component library |
| homepage | https://tailyew.com/ |
| repository | https://github.com/apjames93/tailyew |
| max_upload_size | |
| id | 1617652 |
| size | 298,718 |
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.
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 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) Start the dev server
make run-frontend
Youβll get:
npm install already run for youcargo-watch installed for hot-reloadmake run-frontend) to launch at http://localhost:9001Makefile with dev commands: run-frontend, fe-check, pretty, and moreIn your Cargo.toml:
tailyew = "0.1.38"
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