A package to use Tailwind CSS in Shiny for Python
Project description
shinytail
A lightweight Python package for seamlessly integrating Tailwind CSS with Shiny for Python applications.
Installation
pip install shiny_tail
Features
- Add Tailwind CSS to Shiny with one line of code
- Support for Tailwind plugins and configurations
- Custom themes and styling
- No external CSS dependencies required
- Simple, intuitive API
- Responsive design out of the box
Usage
from shiny import App, ui
from htmltools import tags
from shiny_tail import tailwind
# Configure Tailwind with plugins
tailwind.configure(
plugins=["typography"],
config={"theme": {"extend": {"colors": {"custom-blue": "#1e40af"}}}}
)
# Create a UI with Tailwind classes
app_ui = tailwind.page(
tags.h1("Hello Tailwind", class_="text-3xl font-bold text-custom-blue")
)
def server(input, output, session):
pass
app = App(app_ui, server)
Requirements
- Python >=3.7
- shiny >=0.5.0
- htmltools >=0.4.0
License MIT
Contributing
- Fork the repository
- Create your feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -am 'Add my feature' - Push to the branch:
git push origin feature/my-feature - Submit a pull request
Support For issues and feature requests, please use the issue tracker.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shiny_tail-0.2.0.tar.gz
(3.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shiny_tail-0.2.0.tar.gz.
File metadata
- Download URL: shiny_tail-0.2.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
585d8830e221ed0ddedb924e68c470171e281bb9a3b9f9d20d5433d63e11875d
|
|
| MD5 |
f0704f33628070a8eb5bdb929df4936d
|
|
| BLAKE2b-256 |
7ef995ed488c8a38b2e7f93d0dbcd56f99ecb87f3d1401fc70516d04bdcaeb04
|
File details
Details for the file shiny_tail-0.2.0-py3-none-any.whl.
File metadata
- Download URL: shiny_tail-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80a058390ba59262687ff33ba22dfa8276f9d89c642203390c0ef4cb4a28ad13
|
|
| MD5 |
b22f43b15c9e72b492d12610d15ea679
|
|
| BLAKE2b-256 |
1b319b37c8123bed9aad0ac6495d5ad2f5a4437a76a78379cb6dbcba958a164f
|