The simplicity of FastHTML with the power of Tailwind
Project description
MonsterUI
MonsterUI is a UI framework for FastHTML for building beautiful web interfaces with minimal code. It combines the simplicity of Python with the power of Tailwind. Perfect for data scientists, ML engineers, and developers who want to quickly turn their Python code into polished web apps without the complexity of traditional UI frameworks. Follows semantic HTML patterns when possible.
MonsterUI adds the following Tailwind-based libraries Franken UI and DaisyUI to FastHTML, as well as Python's Mistletoe for Markdown, HighlightJS for code highlighting, and Katex for latex support.
Getting Started
Installation
To install this library, uses
pip install MonsterUI
Getting Started
TLDR
Run python file.py on this to start:
from fasthtml.common import *
from monsterui.all import *
# Choose a theme color (blue, green, red, etc)
hdrs = Theme.blue.headers()
# Create your app with the theme
app, rt = fast_app(hdrs=hdrs)
@rt
def index():
socials = (('github','https://github.com/AnswerDotAI/MonsterUI'),
('twitter','https://twitter.com/isaac_flath/'),
('linkedin','https://www.linkedin.com/in/isaacflath/'))
return Titled("Your First App",
Card(
H1("Welcome!"),
P("Your first MonsterUI app", cls=TextPresets.muted_sm),
P("I'm excited to see what you build with MonsterUI!"),
footer=DivLAligned(*[UkIconLink(icon,href=url) for icon,url in socials])))
serve()
LLM context files
Using LLMs for development is a best practice way to get started and
explore. While LLMs cannot code for you, they can be helpful assistants.
You must check, refactor, test, and vet any code any LLM generates for
you - but they are helpful productivity tools. Take a look inside the
llms.txt file to see links to particularly useful context files!
- llms.txt: Links to what is included
- llms-ctx.txt: MonsterUI Documentation Pages
- API list: API list for MonsterUI (included in llms-ctx.txt)
- llms-ctx-full.txt: Full context that includes all api reference pages as markdown
In addition you can add /md (for markdown) to a url to get a markdown representation and /rmd for rendered markdown representation (nice for looking to see what would be put into context.
Step by Step
To get started, check out:
- Start by importing the modules as follows:
from fasthtml.common import *
from monsterui.all import *
- Instantiate the app with the MonsterUI headers
app = FastHTML(hdrs=Theme.blue.headers())
# Alternatively, using the fast_app method
app, rt = fast_app(hdrs=Theme.slate.headers())
The color option can be any of the theme options available out of the box
katexandhighlightjsare not included by default. To include them setkatex=Trueorhighlightjs=Truewhen calling.headers. (i.e.Theme.slate.headers(katex=True))*
From here, you can explore the API Reference & examples to see how to implement the components. You can also check out these demo videos to as a quick start guide:
- MonsterUI documentation page and Tutorial app
- Isaac & Hamel : Building his website’s team page
- Isaac & Audrey : Building a blog
- Isaac : Building a blog
More resources and improvements to the documentation will be added here soon!
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
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 monsterui-1.0.42.tar.gz.
File metadata
- Download URL: monsterui-1.0.42.tar.gz
- Upload date:
- Size: 38.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f277f7701367bb4b2c12b76aacc380a3519c8c0efa4ee747ce4d296599fe0f8
|
|
| MD5 |
f5056e00167cd5217cf428cf45a5f75d
|
|
| BLAKE2b-256 |
d47dafdcdb0d7b36d1d4e14af98741e564012a81e3fa6807310ab6438a8ca475
|
File details
Details for the file monsterui-1.0.42-py3-none-any.whl.
File metadata
- Download URL: monsterui-1.0.42-py3-none-any.whl
- Upload date:
- Size: 36.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2557946f4fb19b17ed63317f4b48e789c7925b90775d446cb6a7c29f089ba90a
|
|
| MD5 |
1514f5fba2135a5f316b694bd09ab2b8
|
|
| BLAKE2b-256 |
616397186a51cde7f43501c4a993f390e5783a0772cb0d8492a661887531f62d
|