Streamlit Tailwind
If you find this project useful, please consider leaving a star <3
This project, Streamlit Tailwind, is designed to simplify the process of creating user interfaces. It provides a straightforward way to incorporate Tailwind CSS into your Streamlit applications. So, without further ado:
Install
Same as always, good ol' pip (or equivalents)
pip install st_tailwind
Example
import streamlit as st
import st_tailwind as tw
st.set_page_config("Streamlit Tailwind Examples")
def main():
tw.initialize_tailwind()
tw.write("Grid Container", classes="text-blue-500 pb-4")
with tw.container(classes="grid grid-cols-4"):
for idx in range(1, 9):
st.button(f"Button {idx}")
tw.write("Colored Button", classes="text-purple-500 pb-4")
tw.button("Button", classes="bg-red-500")
if __name__ == "__main__":
main()
Usage
Initialization
After configuring your page, call the initialize function so tailwind can be injected as a dependency.
import streamlit as st
import st_tailwind as tw
st.set_page_config("Streamlit Tailwind Examples")
tw.initialize_tailwind()
First way:
Use the tailwind wrapper components.
import st_tailwind as tw
tw.selectbox("test", [], classes="w-fit")
Second way:
Wrap the component yourself. You can add the classes keyword argument either in the wrapper method or on the wrapped method.
import streamlit as st
from st_tailwind import tw_wrap
tw_wrap(st.selectbox, classes="w-fit")("test", [])
tw_wrap(st.selectbox)("test", [], classes="w-fit")
Metadata
Release files for st_tailwind 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| st_tailwind-1.3.0.tar.gz | 7.6 kB | Without provenance | Details for st_tailwind-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| st_tailwind-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for st_tailwind-1.3.0-py3-none-any.whl |
Total release size: 15.7 kB
Release files / st_tailwind-1.3.0.tar.gz
| Download URL | st_tailwind-1.3.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef91d596073526dafccaf946f57db490c2111a81ba334a89f18eb1d87702e007
|
|
BLAKE2b-256 checksum How to use checksums |
c181c5cb4e932dacdb878a5e6e5593efffe402e73684fb840aeef2d1b3783988
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.11
|
Release files / st_tailwind-1.3.0-py3-none-any.whl
| Download URL | st_tailwind-1.3.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc666317c8a6bac708bb0177ee6204af1e25a252312cf83412bcfce983579835
|
|
BLAKE2b-256 checksum How to use checksums |
3301b0c05f9f83d0c85610009f9a0b815cda14a854571bb4f128cbad811956fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.11
|
Security for st_tailwind 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.