Metadata-Version: 2.1
Name: fh_tailwind
Version: 0.0.1
Summary: Tool to use  Tailwind CSS and Daisyui in your FastHTML projects.
Home-page: https://github.com/fbereilh/fh_tailwind
Author: Felipe
Author-email: fbereilh@gmail.com
License: MIT License
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-fasthtml
Provides-Extra: dev

# 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.
