fasthtml_opui
UNOFFICIAL Fast HTML Implementation of the OpenProps UI CSS Library
This Libary is designed as an educational project to make using the Open Props UI Library easy to set up with a fast HTML Web App.
The first part of this app will build “vendor” the required css structure for setting up the appplication to use; - Open Props CSS Custom Variables - Open Props UI
Developer Guide
If you are new to using nbdev
here are some useful pointers to get you started.
Install fasthtml_opui in Development mode
# make sure fasthtml_opui package is installed in development mode
$ pip install -e .
# make changes under nbs/ directory
# ...
# compile to have changes apply to fasthtml_opui
$ nbdev_prepare
Usage
Installation
Install latest from from pypi
$ pip install fasthtml_opui
Documentation
Documentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on conda and pypi respectively.
How to use
from fasthtml.common import *
# Import specific classes from fasthtml_opui
from fasthtml_opui.core import OpenProps, OpenPropsSync
# Initialize OpenProps syncer and sync files
= OpenPropsSync()
syncer
syncer.sync_all()
# Create FastHTML app
= fast_app(hdrs=OpenProps('dark', 'cyan'), pico=False)
app, rt
@rt('/')
def get():
return Titled("Welcome",
Article("Hello World"),
H2("This is a FastHTML app using OpenProps UI"),
P("Click me!", cls="button")
Button(
)
)
serve()