This package requires Tailwind CSS to be installed in your project (globally or locally) before use.
Install Tailwind CSS using npm:
npm install -D tailwindcss
Install this package using pip:
pip install jesa-ui
After installing Tailwind CSS and this package, you can use the CLI to install UI components:
jesa-ui install button --to <your-components-dir>
This will copy the specified component (e.g., button
) into your project's components directory.
Here's how to use the button component in your templates:
<div class="flex flex-col justify-center items-center space-y-4">
{% import "components/button.j2" as Component %}
{{ Component.Button(type="button", label="Default Button", class_="w-full", disabled=false) }}
{{ Component.Button(type="button", label="Disabled Button", class_="w-full", disabled=true) }}
</div>
- This package is framework-agnostic and can be used with any Python web framework (e.g., Flask, Django, FastAPI, etc.).
- Make sure you have Tailwind CSS set up in your project to process the provided component templates.
MIT