Already installed and want to make it yours? This track walks the packaged chirp-theme from the outside in: enable it, learn the theme controls it ships, then map the chrome vocabulary those controls live inside. Read in order for a complete picture of how the theme is assembled and customized.
chirp-theme
Static-first Bengal theme packaged inside the chirp-ui project
chirp-theme is a static-first Bengal theme packaged in the chirp-uiproject.
It takes the visual language from theb-sitemarketing shell and adapts it to
Bengal's documentation and content templates: warm paper surfaces, phosphor dark
mode, cyan and amber accents, crisp radii, and an editorial docs chrome.
Thechirp-uidocs site uses this theme directly, so the package gets exercised
on a real Bengal site rather than living as a disconnected example.
Quickstart: Adopt It on a Bengal Site
If you have a Bengal site, applying
chirp-theme is three steps. No separate theme package — the theme ships inside
chirp-ui and registers through the bengal.themesentry point.
1. Install (this also installs the theme).
uv add chirp-ui
# or
pip install chirp-ui
chirp-uideclares the theme entry point
chirp-theme = "bengal_themes.chirp_theme", so Bengal discovers it
automatically once the package is installed. You also need Bengal >=0.3.3
(for thelibrary_asset_tags()hook described below); add it as a build
dependency if it is not already present:
uv add "bengal>=0.3.3"
2. Set the theme in your site config.
# config/_default/theme.yaml (or the theme block in bengal.toml)
theme:
name: "chirp-theme"
3. Build and serve.
uv run bengal build
uv run bengal serve
That is enough to render a Bengal docs or marketing site with chirp-theme's shell, typography, and dark mode.
Requires Bengal >=0.3.3 —
library_asset_tags(). chirp-theme'sbase.htmlcalls Bengal'slibrary_asset_tags()to inject the component library's bundledchirpui.css(the base tokens, reset, layout grid, and component styles). That hook ships in Bengal 0.3.3. On older Bengal the call is silently skipped,chirpui.cssnever loads, and the page renders with collapsed spacing and a broken grid in the footer and top bar. If your theme looks unstyled, check your Bengal version first.
A new-user adoption checklist also lives on the [Installation] page.
Enable It
Set the active Bengal theme in your site configuration:
theme:
name: "chirp-theme"
What v1 Includes
- A packaged Bengal theme entry point:
chirp-theme = "bengal_themes.chirp_theme" - A standalone theme package with its own shell templates, partials, and assets
- Static-first templates for
base.html,home.html,page.html,doc/home.html,doc/list.html, anddoc/single.html - Retained core parity templates for
blog/shell.html,blog/list.html,blog/single.html,post.html,search.html, and404.html - Retained taxonomy/archive/author, learning/content, autodoc/API reference, shortcode/embed, root alias, and utility templates listed in the parity matrix
Design Scope
v1 focuses on:
- docs sites
- product/marketing pages
- content-heavy static sites
v1 does not try to reproduce every Chirp application-shell pattern inside Bengal. The goal is a strong static-site shell first, with enough coverage to grow into a credible Bengal default-v2 candidate over time.
Ownership Model
chirp-theme is owned by the chirp-uiproject and should behave like a real,
installable Bengal theme package, not a thin overlay on Bengal default.
That means the package itself should own:
- the shell templates
- theme partials/macros
- the canonical
assets/css/style.cssentrypoint - any JS, icons, fonts, favicons, or manifests referenced by the shell
Thechirp-uidocs site is the acceptance target for that contract, so the
theme is continuously dogfooded on a real Bengal site.
In the current cutover, "standalone" means the package owns the full runtime
surface. The theme currently vendors the Bengal default asset and partial
baseline intochirp-theme, then layers the chirp-themeshell and styling on
top. The next phase is to replace more of that inherited baseline with more
opinionatedchirp-ui-driven patterns.
Longer-Term Direction
The broader goal is to build a better and more comprehensive alternative to the
historical Bengal default theme using modernchirp-ui, Kida, and Alpine-era
patterns. The original default theme carries early-project CSS and template
conventions;chirp-themeis the place to reach parity, simplify the old
patterns, and then go beyond them.
That evolution happens from a standalone package baseline, not through continued runtime dependence on Bengal default internals.
Parity Policy
chirp-themetreats Bengal default's broad output coverage as the long-term
target, but it does not treat the copied default templates and CSS as the target
implementation.
- Retained: shell, docs, generic pages, blog/post, search, 404, taxonomy/archive/authors, learning/content, autodoc/reference/API-hub, shortcodes/embeds, root aliases, and utility pages
- Retained surfaces should be rebuilt with Chirp UI-native templates and tokens rather than preserved as copied default-theme implementations
- Deferred: niche graph/data-table/experimental UI until an output contract needs them
The repo-level parity matrix indocs/theming/chirp-theme-parity-matrix.mdis the
source of truth for those decisions.
The canonical source guide is
docs/theming/chirp-theme.md.
Bengal theme controls anatomy
Packaged chirp-theme hooks for theme menus, search, mobile nav, TOC, and docs tabs
Bengal theme controls anatomy
The packagedchirp-themeships static-site controls for appearance menus,
search, mobile navigation, docs navigation, table-of-contents tracking, and
content tabs.
These are Bengal theme partial and asset hooks, not registry-owned Chirp UI component macros. App-level component contracts still come from the Chirp UI component registry, macros, generated CSS, and manifest.
The full rendered contract, selectors, browser-owned behavior, JavaScript
exports, and proof locations live in the canonical source guide:
docs/theming/bengal-theme-anatomy.md.
UI layers & terms
App shell, page chrome, surface chrome, and shell regions — one vocabulary
UI layers & terms
This page aligns with the Chirp guide: UI layers & shell regions (same concepts; Chirp owns thechirp.shell_regionsconstants).
Quick glossary
| Term | Meaning |
|---|---|
| App shell | Persistent layout fromchirpui/app_shell_layout.html or app_shell() + shell_outlet(): topbar, sidebar, #main wrapper. Not replaced on navigation; #page-content inside #mainswaps, while the document owns vertical scroll by default. |
| Page content | The document area:#page-content — what hx-select targets for boosted nav, provided by app_shell_layout.html or shell_outlet(). |
| Page chrome | Route-owned UI inside#page-content: titles, tabs, toolbars — not the global topbar. |
| Shell actions | ShellActions → shell_actions_bar, target #chirp-shell-actions. Route-scoped; updates via OOB. |
| Shell regions | Stableids updated by hx-swap-oob (e.g. chirp-shell-actions, chirpui-document-title). |
| Marketing site shell | Full-page scroll layout:site_shell() + site_header() + site_footer(). Use for landing pages, docs homes, marketing sites. Counterpart to app shell — same document-scroll philosophy, no sidebar. |
| Surface chrome | Visual frame of a component (surface, panel, bento): border, padding, scroll — not the app shell. |
| Navigation domain | The author-facing boundary declared in Chirp_layout.html via {# domain: name #}. swap_attrs()uses shared domain ancestry to choose the right swap target. |
Avoid: using "chrome" alone for the whole app frame — say app shell, site shell, or topbar/sidebar.
Chirpmount_pageslayouts
Filesystem_layout.html files that extend app_shell_layout should declare {# target: body #}, an explicit {# domain: ... #}, and {# outlet: main #} so Chirp can:
- decide which links should boost together from shared domain ancestry
- match
HX-Target: #mainfor intra-domain app-shell navigation - return HTML that still includes
#page-contentforhx-select
Minimal pattern:
{# target: body #}
{# domain: workspace #}
{# shell: workspace #}
{# outlet: main #}
{% extends "chirpui/app_shell_layout.html" %}
See the Chirp guide Filesystem routing for the routing-side contract.
chirp-ui responsibilities
app_shell_layout.html— Defines the shell DOM, registers no extra Python; pairs with Chirp’suse_chirp_ui(app).- Shell coherence script — Clears
#chirp-shell-actionsinhtmx:beforeSwapwhen the response includes a shell-actions OOB, so users never see one frame of new page + stale actions (htmx runs primary swap before OOB).
Response boundaries
Application pages normally use three nested HTMX targets:
| Boundary | Target | Owner |
|---|---|---|
| Shell navigation | #main |
full page response with#page-contentand any changed OOB shell regions |
| Section navigation | #page-root |
page chrome and inner content for route-tab clicks |
| Local tools | #page-content-inneror a named fragment target |
local fragment only, isolated from inherited shell selectors |
Server code should inspectHX-Targetbefore choosing a response shape. A
genericHX-Requestcheck is not enough: shell navigation and route-tab
navigation are both HTMX requests, but they have different owners.
Related docs
- Repo:
docs/fundamentals/ui-layers.md(duplicate reference for editors) - Repo:
docs/components/shell-tabs-contract.md(route-tab and response-shape checklist) docs/fundamentals/layout-overflow.md— keeping the main column stabledocs/COMPONENT-OPTIONS.md— components; distinguishes surface chrome from shell