semvec/pypi-packages huggingface dataset:
fh-tailwind 0.0.2
Tool to use  Tailwind CSS and Daisyui in your FastHTML projects.
License: MIT License
Requires Python: >=3.7
Keywords: nbdev jupyter notebook python

# fh_tailwind


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

📖 Explore the Documentation for more examples and details!  
https://fbereilh.github.io/fh_tailwind/

## Key Features

⚙️ Tailwind and DaisyUI Setup 🔍 Dynamic Class Extraction 🎨 Custom
Themes

## 🛠️ Installation

Ensure that Node.js is installed before proceeding. Install the package
using pip:

``` sh
$ pip install fh_tailwind
```

## 🚀 Usage

To set up Tailwind in your project, use the following command in the
root of the project to initialize everything:

``` sh
$ fh_tailwind_setup
```

This command will configure Tailwind and DaisyUI in your project,
creating all necessary files and folders (public and node).

## 📋 Example: FastHTML with Tailwind and DaisyUI

To start using the package in your project:

``` python
from fh_tailwind import update_styles
from fasthtml.common import Link, fast_app, serve, Div, P

hdrs = [Link(rel="stylesheet", href="public/styles.css", type="text/css")]
app, rt = fast_app(
    live=True,  # 🔴 Enable live updates
    pico=False,  # 🚫 Disable PicoCSS to use Tailwind instead
    on_startup=[update_styles],  # 🔄 Run update_styles during startup
    hdrs=hdrs,
    htmlkw={"data-theme": "mytheme"},
)

@rt("/")
def get():
    return Div(cls="flex items-center justify-center h-96")(
        P(cls="text-6xl text-center font-bold")(
            "Hello, Tailwind and DaisyUI with mytheme is applied!")
        )

serve()
```

## 📋 Requirements

- Node.js: This package depends on Node.js for installing and managing
  Tailwind CSS and DaisyUI.

- Python 3.x: This script uses Python 🐍 to manage files and execute
  commands.

## 📜 License

This package is open source under the MIT License.

## 🤝 Contributions

Contributions are welcome! Feel free to submit a pull request 🔃 or
create an issue 🐞 if you find a bug or have a feature request.

Happy coding with FastHTML and Tailwind CSS! 🎉💻 For more examples,
detailed instructions, and further customization options, visit our
official documentation.