Install
pip install chirp-ui==0.4.0
# or
uv add chirp-ui==0.4.0
With Chirp:
pip install "bengal-chirp[ui]"
What's New
Sharp-edges hardening (phases 1--4)
A systematic audit and fix pass across the entire component library:
- Phase 1 --- Normalized variant/size defaults to empty strings, added
hx={}dict shorthand tobtn/icon_btn/form, filled 53 missing CSS tokens, migratedoverflow: hiddentooverflow: clip, wrappedlocalStoragein try/catch, aligned test stubs with real filters (43 parity tests), documented all 195 templates inCOMPONENT-OPTIONS.md. - Phase 2 --- Renamed colliding macros (
segmented_controltosegmented_control_field,tabtotab_button),bem()strips invalid modifiers,contrast_text()warns on unparseable colors, addedis_strict()/reset_colors()APIs,--chirpui-z-*/--chirpui-anim-*tokens replacing 114 hardcoded CSS values,tab_is_active()guarded against empty href. - Phase 3 ---
btn()defaults totype="button",build_hx_attrs()validates against known htmx attrs,field_errors()warns and coerces non-list values, pagination uses<button disabled>instead of<span aria-disabled>, avatar gainsdecorativemode, Alpineregister()gets idempotency guard, 44@provides/@consumesannotations inline. - Phase 4 --- Standardized slot naming (
footerparam to slot in card,actionscanonical),attrstoattrs_unsafeacross 37 macros with deprecation warning,hx={}dict in all macro docstrings +HTMX-PATTERNS.md, neumorphic CSS from 102 to 44 selectors,assert_element()test helper with 29 structural tests,docs/INDEX.mdnavigation index.
Context-aware theming
timeline, callout, status_indicator, and settings_row_list automatically adapt when nested inside surface() or card() via --on-<surface>CSS modifier classes.
SVG pattern tiles and CSS-only patterns
10 reusable SVG pattern tiles undertemplates/patterns/ with --chirpui-pattern-* tokens and .chirpui-texture overlay utilities. CSS-only gradient patterns: .chirpui-bg-pattern--* (dots, grid, diag, crosshatch, weave), .chirpui-band pattern variants, full-page .chirpui-ambient, and noise/static overlay utilities.
New composites
install_snippet--- command + copy buttonfilter_row--- lightweight inline filter formtag_browse--- tray + badges for tag-filtered listingssettings_row--- label + status badge + detail
Other improvements
- ComponentDescriptor coverage: 199 total (101 new), with a test gate ensuring every template has a descriptor.
- Migrated 5 composite templates to kida's
{% yield %}directive. - Bumped
kida-templatesdependency to>=0.6.0.
Fixes
- Global CSS reset (
box-sizing: border-box,body { margin: 0 }),vhtodvhon modals/drawers/dropdowns,:focus-visibleon tabs/accordion/collapse/segmented, neumorphic dark-mode shadows, toast z-index, site-header glass@supportsguard, scroll-anchor for sticky headers. - Missing
chirpui-font-mediumCSS utility. - Muted color-mix tokens now derive from
var(--chirpui-surface)instead of barewhite, fixing dark-mode backgrounds. - Tray overlay
aria-hidden="true"for pre-Alpine hydration.