Skip to main content

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!

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:

  1. Start by importing the modules as follows:
from fasthtml.common import *
from monsterui.all import *
  1. 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

katex and highlightjs are not included by default. To include them set katex=True or highlightjs=True when 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:

More resources and improvements to the documentation will be added here soon!

Release files for monsterui 1.0.47

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for monsterui 1.0.47
File Size Uploaded
monsterui-1.0.47.tar.gz 37.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for monsterui 1.0.47
File Interpreter ABI Platform
monsterui-1.0.47-py3-none-any.whl Python 3 none any Details

Total release size: 74.8 kB

Release files / monsterui-1.0.47.tar.gz

Download URL monsterui-1.0.47.tar.gz
Size 37.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fd283d96616fa5817b5540cb60d0545a865e3281b0c6f0f65e426a234a5a122b
BLAKE2b-256 checksum
How to use checksums
771d9a9d6d388ffcf70caee819dd765cf9d896287efea2e746ccef2de3ba472c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release files / monsterui-1.0.47-py3-none-any.whl

Download URL monsterui-1.0.47-py3-none-any.whl
Size 37.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aefd7036d4c362b3f721ba733812f94830e14eeadbe096a93fcbe41acd4afba7
BLAKE2b-256 checksum
How to use checksums
7a210e830d7ebee34adbfc5feed8cee2d7f66a62cb5247409d082239b3dfad7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

1.0.47 This release

2 release files

1.0.46

2 release files

1.0.45

2 release files

1.0.44

2 release files

1.0.42

2 release files

1.0.41

2 release files

1.0.40

2 release files

1.0.39

2 release files

1.0.38

2 release files

1.0.37

2 release files

1.0.36

2 release files

1.0.35

2 release files

1.0.32

2 release files

1.0.31

2 release files

1.0.30

2 release files

1.0.29

2 release files

1.0.28

2 release files

1.0.27

2 release files

1.0.26

2 release files

1.0.25

2 release files

1.0.24

2 release files

1.0.21

2 release files

1.0.20

2 release files

1.0.19

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.20

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page