Skip to content
wdj

Interaction guide

Use native controls for their built-in behaviour, Alpine.js for local state, and HTMX when the server owns data.

Advanced integration: calendars, custom Select, Flow, maps, LayerDialog and chart legends

Choose the owner of each action

OwnerUse for
HTML + wdj.jsForms, sliders, accordions, dialogs, popovers, menus, copy and reveal.
Alpine.jsLocal tab panels, calendars, custom Select, counters, sidebar state and chart lifecycle.
Django + HTMXSearch, filtering, sort, pagination, validation and persistence.

A styled Button does not invent a business action. Set a URL, a form type, HTMX attributes or an Alpine handler. Presentation commands in this demo only show a notification.

Live playground

Try the buttons, local tabs, both slider handles and exclusive accordion. Reload replaces this fragment; the controls initialize again and local state resets.

0
Project configuration, rendered locally.
Preferences change without a server request.
Disabled panel.

Drag either handle or use arrow keys. Values reset with the form.

First accordion section

Native details work with Enter and Space.

Second accordion section

A shared name allows only one expanded section.

Integration steps

  1. Add wdj to Django, serve its static files and load HTMX, wdj.js, then Alpine.js.
  2. Use explicit, unique IDs and labels. Use the block tag for HTML slots; use only for nested includes.
  3. Return only fragment markup for HTMX. Set Vary: HX-Request and Cache-Control: no-store for dynamic fragments.
  4. Keep Alpine state on a stable parent if it must survive swaps. Never conditionally remove dialog markup.
  5. Validate POST data and permissions in Django. Include a CSRF token; button state is browser feedback.
  6. Rebuild CSS when template classes change, then test the changed interaction and keyboard path.

Check an integration

Verify mouse and keyboard use, disabled/loading states, native validation, focus return, repeated HTMX swaps, form reset, both themes and a narrow viewport. Test the actual endpoint for persisted actions.

Repository references: docs/GUIDE.md (complete workflow), docs/SKILL.md (component API), docs/INTERACTIONS.md (behaviour and verification), docs/DECISIONS.md (adaptations).

Components

Components overview
AutocompleteFree-form input with local or HTMX-filtered suggestions.
BadgeSolid, tinted, outline and dot status labels.
BannerInline message bar with variants and optional action.
BreadcrumbsTrail navigation in two sizes.
ButtonVariants, sizes, shapes, icons and loading state.
ButtonGroupJoins a small set of tightly-coupled buttons into a single control (split buttons).
CheckboxSingle checkbox and indeterminate state.
ClipboardTextRead-only text field with a one-click copy-to-clipboard button.
Code / CodeHighlightedEscaped Pygments grammar highlighting, multiline tokens, line numbers, highlighted lines and localized copying.
CollapsibleComposable disclosure component for showing and hiding content.
Combobox / AutocompleteKumo-styled input/button triggers, search inside the popup, grouped local choices and debounced HTMX search.
CommandPaletteAccessible spotlight search overlay with Cmd+K keyboard shortcut.
DatePickerKumo-styled date and datetime popups; inline single, multiple and range calendars with bounds/presets.
DateRangePickerStyled popup or inline range calendar with bounds, presets and separately named form values.
DialogNative <dialog> modal with focus management.
DrawerEdge-anchored modal panel. LayerDialog has its own layered component.
DropdownMenuNative details menu with delegated keyboard navigation and dismissal.
EmptyEmpty-state placeholder with icon and action.
FieldLabel + description + error wrapper. Built into each control.
FlowDirected diagrams with branches, SVG connectors, custom anchors and responsive local scrolling.
GridResponsive CSS grid layout container with preset column configurations.
InlineCopyTextCompact borderless copy control for IDs and short values.
InputText field with label, description, leading/trailing icons.
InputAreaMulti-line textarea with auto-resize option.
InputGroupInput field with seamless prefix, suffix, and addon attachments.
LabelForm field label, optional marker and tooltip.
LayerCardCompound surface card with distinct primary and secondary layers.
LayerDialogLayered native modal with actions, forms, nested dialogs and pending states.
LinkInline, current and plain text links.
LoaderAnimated spinner in three sizes.
MenuBarCompact view selector using native radio semantics.
MeterProgress bar showing a measured value within a known range.
PaginationA page navigation component for navigating through paginated content.
PopoverAnchored popup with interactive content.
RadioRadio group, vertical and horizontal.
SelectKumo-styled Alpine dropdown with groups, rich options and multiple selection; native form values and fallback.
SensitiveInputPassword/secret input with reveal toggle and copy button.
SeparatorHorizontal / vertical rules with optional label.
SidebarRecursive navigation groups, account/zone views, search, loading, resize and full-screen mobile breadcrumbs.
SkeletonShimmer placeholder.
SliderInset single/range selection with vertical grips, value badges, endpoint labels and native keyboard/form behavior.
SurfaceBordered surface panel with header slot.
SwitchOn/off toggle in three sizes.
TableServer-driven table: sort, filter, select and paginate the full dataset.
Table of contentsPage section navigation tree with active link indicator.
TabsSegmented and underline tabs with a sliding indicator, responsive overflow and local Alpine or URL/HTMX state.
TagInputMulti-value badge input for tags and recipients.
TextHeading, body, secondary, success, error and mono text.
ToastyExpandable notification stack with variants, paused expiry and a live region.
ToolbarCompact grouped controls with shared borders, composed filters and keyboard arrow navigation.
TooltipHover and focus tooltip with grouped delays, Escape dismissal and viewport bounds.
↑ ↓ Navigate ↵ Select