Skip to main content

A FastHTML UI component library based on basecoat CSS

Project description

BasecampUI

BasecampUI is a FastHTML UI library built on top of the excellent Basecoat. It's design goal is to create complex UI components with minimal boilerplate, while still allowing as much customization as possible.

See live component examples by reading the docs: https://base-camp-ui.solve.it.com/

Quickstart

pip install basecampui
from fasthtml.common import *
from basecampui.all import *

app = FastHTML()
rt = app.route

@rt
def index():
    return Div(
        Breadcrumb(['Home', 'Documents', 'Doc 1']),
    )

serve()

Using Icons

BasecampUI uses fastlucide for icons. For development purposes, basecampui.all provides a standalone Icon function that creates a new SVG for each icon instance, making it easy to quickly iterate.

Div(
    Icon("apple")
)

If you are happy with your set of icons, you can predefine them on app setup, and use the fastlucide spritesheet singleton instead of Icon function. This create a reference sprite sheet that all icons icons point to, making it more efficient when rendering a large number of the same icons.

app = FastHTML(icons=["apple"])

Div(
    spritesheet("apple")
)

Code highlighting

Code highlight is included by default on app setup. You can disable this to reduce loadtimes if you don’t need highlighting for your project.

app = FastHTML(code_highlight=False)

If you do want code highlighting, you can optionally pass in custom keywords to the app startup.

custom_kws="myFunction myClass CodeHighlightFunc"
app = FastHTML(custom_kws=custom_kws)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

basecampui-0.0.2.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

basecampui-0.0.2-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file basecampui-0.0.2.tar.gz.

File metadata

  • Download URL: basecampui-0.0.2.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for basecampui-0.0.2.tar.gz
Algorithm Hash digest
SHA256 91bc046497122d88c6266b2c62101c8208547d524fb9b75cefb41874fa5332d6
MD5 c66c873875757179c4332404e6fcd042
BLAKE2b-256 da943aab524d2dffb094cde2e9c8a601fc325810ca2ddc8300dcc624296576a9

See more details on using hashes here.

File details

Details for the file basecampui-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: basecampui-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for basecampui-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f3eb06e05b3aa7f8d1776c7a39b109567857b556e2316f47f331ff56b8421410
MD5 5e82bdae03e19fb30676ae53cdd08681
BLAKE2b-256 b4d513403b899ec2244d250245a3761cda31ecd1dc7c884c4eb0aa60800936fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page