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

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.1.tar.gz (21.0 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.1-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: basecampui-0.0.1.tar.gz
  • Upload date:
  • Size: 21.0 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.1.tar.gz
Algorithm Hash digest
SHA256 c9dd4ae8f37c8e5c149e06bbd265fad2918e6ea2b3b05f19437da3cc4cfc4309
MD5 a4a0da22db1c8c3b69534042bf422fa1
BLAKE2b-256 b82856e55aa6a3b10e544f1fba1c31009ac152dc0eca43b3d420e16f3d6e5d78

See more details on using hashes here.

File details

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

File metadata

  • Download URL: basecampui-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ed42faa4a775ec1b31f15895628ba3a144dedfe328640a0b430b3ab7c8de126
MD5 2341cd9d446eab49bc7b0462f9ce0933
BLAKE2b-256 ebee1c69edc04c16d14a9ba814e43c48bc6c94dbe7a47543ddc73b83afb971fb

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