create-tailyew-app

Crates.iocreate-tailyew-app
lib.rscreate-tailyew-app
version0.1.15
created_at2025-05-24 18:52:17.655195+00
updated_at2026-01-23 19:20:35.535555+00
descriptionCLI to scaffold a new Tailyew Yew+Tailwind project
homepagehttps://tailyew.com/
repositoryhttps://github.com/apjames93/tailyew
max_upload_size
id1687683
size1,660,519
Alex James (apjames93)

documentation

https://tailyew.com

README

create-tailyew-app

✨ TailYew

Docs.rs License CI WASM Ready Powered by Yew Components Demo

A zero-config CLI to scaffold and bootstrap a production-ready TailYew frontend SPA.

πŸš€ Instantly spin up a modern Yew + TailwindCSS app!

Pure Rust & WASM in production β€” no JS needed to run your UI.

Note: Tailwind’s CLI (via npm) is still required for development builds, and the dev server runs on Trunk.

Dreaming of a totally Rust-native toolchain? Us too! We’re open to ideas and contributions.

βœ… Yew 0.22 Ready
Projects scaffolded with create-tailyew-app use Yew 0.22 and TailYew v0.1.43 by default.


✨ What is this?

create-tailyew-app is the official scaffolding tool for the TailYew component system. It sets up a best-practices Yew + Tailwind starter so you can focus on features, not configuration.

You get:

  • Uses TailYew v0.1.43 (Yew 0.22 compatible) by default
  • A ready-to-go Yew/WASM frontend with TailwindCSS (JIT mode)
  • Live-reload via Trunk
  • Dark mode + accessibility baked in
  • Examples of atomic, composable UI via TailYew
  • Smart Makefile for build, lint, and dev workflows
  • Small bundle sizes and no JS dependencies (besides Tailwind tooling)
  • See live TailYew demos Β»

πŸ› οΈ Installation

cargo install create-tailyew-app

Requires Rust 1.65+ and npm in your PATH.


πŸš€ Quick Start

create-tailyew-app <NAME> [--dest <BASE_DIR>]
  • NAME β€” Your new project folder (required)
  • --dest β€” (Optional) Output directory (default: .)

Example

rustup target add wasm32-unknown-unknown   # if not already installed
cargo install trunk                        # if not already installed

create-tailyew-app tailyew-app
cd tailyew-app
npm install                                # for tailwindcss cli
make run-frontend

This launches your dev server at http://localhost:9001.


πŸ“ What’s Generated

<BASE_DIR>/<NAME>/
β”œβ”€ frontend/
β”‚  β”œβ”€ Cargo.toml           # Yew/WASM crate
β”‚  β”œβ”€ tailwind.config.js   # TailwindCSS setup (pre-configured for TailYew)
β”‚  β”œβ”€ src/                 # Rust app sources
β”‚  β”œβ”€ static/              # HTML, safelist, assets, WASM pkg
β”‚  β”œβ”€ Trunk.toml           # Trunk config (dev server/build)
β”‚  β”œβ”€ index.html           # Trunk entry point
β”‚  └─ Makefile             # Frontend build & serve tasks (Trunk + Tailwind)
β”œβ”€ Makefile                # Root orchestrator (run-frontend, lint, format, etc)
└─ README.md               # This file
  • Tailwind Safelist: static/tailyew-safelist.html is included for correct dark-mode & dynamic class extraction.
    • Refresh it after upgrading TailYew: from the project root run make fe-copy-tailyew-safelist (or inside frontend/ run make copy-tailyew-safelist).
  • Live Reload: Hot-reloading for rapid dev (edit, save, reload).

⚑ Powered by TailYew

  • πŸŒ— Dark mode ready with Tailwind’s dark: utilities
  • 🧹 50+ components: Buttons, Inputs, Tables, Modals, Charts, Accordions, and more
  • πŸ“™ Markdown auto-renders to beautiful, theme-aware TailYew elements
  • πŸ“Š Charts (Bar, Line, Bubble, Pie, Scatter) β€” no JS required
  • πŸ“ Composable Forms β€” with validation and accessibility
  • 🦠 Pure Rust β€” no JS/TS needed for your UI
  • πŸ“¦ Tiny WASM builds β€” thanks to Tailwind JIT and no-runtime bloat
  • πŸ“ A11y: ARIA, labeling, and more

Explore live components: tailyew.com/demo/getting_started

πŸ§ͺ 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.


🎬 Dev server

cd <BASE_DIR>/<NAME>
make run-frontend
  • Watches Rust sources (frontend/src, frontend/static)
  • Rebuilds WASM + Tailwind via Trunk pre-build hook, auto-reloads browser
  • Serves locally at localhost:9001

πŸ”§ Useful Makefile Targets

From your project root:

  • **make help ** - in the generated project to see all available targets.
  • make format β€” Format Rust sources
  • make lint β€” Lint with Clippy
  • make pretty β€” Format + Lint
  • make run-frontend β€” Serve with hot-reload
  • make fe-copy-tailyew-safelist β€” Refresh the TailYew safelist HTML from your local Cargo registry

❀️ Contributing

Help grow the Rust UI ecosystem:

  1. Fork & clone this repo
  2. Edit starter/app/ to change the template
  3. Tweak CLI in src/
  4. Run make pretty to format & lint
  5. Open a PR β€” all feedback welcome!

πŸ“š Helpful Links


πŸ”— Related Projects

Commit count: 156

cargo fmt