Metadata-Version: 2.4
Name: basecampui
Version: 0.0.1
Summary: A FastHTML UI component library based on basecoat CSS
Home-page: https://github.com/taya-nicholas/basecampui
Author: Taya Nicholas
Author-email: taya.nicholas@outlook.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastcore
Requires-Dist: python-fasthtml
Requires-Dist: fastlucide
Provides-Extra: dev
Requires-Dist: lancedb; extra == "dev"
Requires-Dist: google-genai; extra == "dev"
Requires-Dist: lisette; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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

``` sh
pip install basecampui
```

``` python
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.

``` python
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.

``` python
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.

``` python
app = FastHTML(code_highlight=False)
```

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

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