leptos/examples/tailwind
2023-09-13 19:57:50 -04:00
..
end2end test: verify tailwind example with playwright tests (#1062) 2023-05-19 13:04:06 -04:00
public Add Favicons to all the examples and standardize on the public folder for public assets 2023-01-09 15:27:52 -08:00
src change: move logging macros into a logging module to avoid name conflicts with log and tracing (#1658) 2023-09-08 07:42:58 -04:00
style examples: use cargo-leptos Tailwind support in Tailwind examples (#1625) 2023-09-06 07:25:00 -04:00
.gitignore test: verify tailwind example with playwright tests (#1062) 2023-05-19 13:04:06 -04:00
Cargo.toml examples: use cargo-leptos Tailwind support in Tailwind examples (#1625) 2023-09-06 07:25:00 -04:00
LICENSE Tailwind example ported 2022-12-23 13:10:45 -05:00
Makefile.toml refactor(examples): extract client process tasks (#1665) (#1666) 2023-09-08 07:31:55 -04:00
README.md doc(examples): reference run instructions (#1705) 2023-09-13 19:57:50 -04:00
rust-toolchain.toml examples: use cargo-leptos Tailwind support in Tailwind examples (#1625) 2023-09-06 07:25:00 -04:00
tailwind.config.js Tailwind example ported 2022-12-23 13:10:45 -05:00

Leptos Starter Template

This is a template demonstrating how to integrate TailwindCSS with the Leptos web framework and the cargo-leptos tool.

Getting Started

See the Examples README for setup and run instructions.

Tailwind

You can install Tailwind using npm:

npm install -D tailwindcss

If you'd rather not use npm, you can install the Tailwind binary here.

Setting up with VS Code and Additional Tools

If you're using VS Code, add the following to your settings.json

  "emmet.includeLanguages": {
    "rust": "html",
    "*.rs": "html"
  },
  "tailwindCSS.includeLanguages": {
      "rust": "html",
      "*.rs": "html"
  },
  "files.associations": {
      "*.rs": "rust"
  },
  "editor.quickSuggestions": {
    "other": "on",
    "comments": "on",
    "strings": true
  },
  "css.validate": false,

Install Tailwind CSS Intellisense.

Install VS Browser extension (allows you to open a browser at the right window).

Allow vscode Ports forward: 3000, 3001.

Attribution

Many thanks to GreatGreg for putting together this guide. You can find the original, with added details, here.