djust docs
Browse documentation
reference

Component reference

Find a built-in component and check its constructor, defaults, events and options. 179 components, indexed A–Z.

On this page

Jump to a component using the alphabetical index. Descriptions, signatures, defaults, events and accessibility rules come from the same registry the live catalogue renders, so the two cannot disagree.

Every entry links to its page on djust.org, where the component is running: flip its options, copy the two files you would write, and read its props against the version deployed there. This page is built from the djust checkout this documentation pins, so the two can differ.

For composition and event handling, start with the components guide. For custom component base classes, see Components API.

Using them

A component's constructor arguments are its state, and writing one re-renders:

from djust.components import Rating

def mount(self, request, **kwargs):
    self.rating = Rating(value=4, max_stars=5)

@event_handler()
def set_rating(self, value, **kwargs):
    self.rating.value = value

Render it in your Django template:

{{ rating }}

Alphabetical index

A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · V · W

ComponentPurpose
AccordionAccordion/collapsible sections component.
Activity FeedReal-time activity feed with streaming support.
Agent StepAI agent tool-use step card.
AlertStyle-agnostic alert component using CSS custom properties.
Animated NumberAnimated counting number display.
Announcement BarAnnouncement/banner bar component.
App ShellApplication shell layout component.
Approval GateInline confirmation card for AI agent actions with risk levels.
Aspect RatioAspect ratio container component.
Audit LogStyle-agnostic audit log table component.
AvatarAvatar component with optional status indicator.
Avatar GroupStyle-agnostic avatar group using CSS custom properties.
BadgeStyle-agnostic badge component using CSS custom properties.
Bar ChartStyle-agnostic SVG bar chart using CSS custom properties.
Bottom SheetStyle-agnostic bottom sheet / drawer component.
BreadcrumbBreadcrumb navigation component.
Breadcrumb DropdownBreadcrumb navigation with overflow collapse into dropdown.
ButtonStyle-agnostic button component using CSS custom properties.
Calendar HeatmapStyle-agnostic SVG calendar heatmap (GitHub contribution style).
Calendar ViewMonth/week/day calendar view with event slots.
CalloutCallout/blockquote component.
CardStyle-agnostic card container using CSS custom properties.
CarouselImage carousel/slideshow component.
Chat BubbleSingle chat message bubble with sender avatar, timestamp, and delivery status.
Checkbox
Code BlockCode block with syntax highlighting component.
Code SnippetCode block with copy button and language badge.
Collab SelectionHighlights text or cell ranges selected by other users.
CollapsibleCollapsible/expandable section component.
Color PickerColor picker with swatches component.
ComboboxSearchable select (combobox) component.
Command PaletteCommand palette/search overlay component.
Comparison TableFeature comparison table for SaaS plans / product tiers.
Connection StatusSlim bar showing WebSocket state.
Content LoaderStyle-agnostic content loader / suspense component.
Context MenuContext menu (right-click menu) component.
Conversation ThreadChat-style message thread with sender avatars, timestamps, and grouping.
Cookie ConsentStyle-agnostic cookie consent banner.
Copy ButtonCopy-to-clipboard button component.
Copyable TextInline click-to-copy text with "Copied!" tooltip feedback.
CountdownStyle-agnostic countdown timer component.
Cron InputVisual cron expression builder with human-readable preview.
Currency InputNumeric input with currency symbol prefix and formatting hints.
Cursors OverlayOverlay showing other users' cursor positions in real-time.
Dashboard GridCSS Grid layout with draggable and resizable dashboard panels.
Data Card GridFilterable card grid layout.
Data GridEditable spreadsheet-like data grid with cell editing, column resize,
Data TableData table component for tabular data display.
Date PickerServer-rendered calendar date picker component.
Dependent SelectCascading dropdown that reloads options when a parent field changes.
Description ListDescription list (term/detail pairs) component.
Diff ViewerSide-by-side or unified text diff viewer.
DropdownDropdown menu component.
Dropdown MenuStyle-agnostic dropdown menu component.
Empty StateEmpty state placeholder component.
Error BoundaryStyle-agnostic error boundary component.
Error PageStyled error page with code, title, message, and action.
Expandable TextStyle-agnostic expandable text component using CSS line-clamp.
Export DialogStyle-agnostic export dialog component.
FabFloating action button component.
Feedback WidgetThumbs up/down, star rating, or emoji feedback widget.
FieldsetFieldset with legend component.
File DropzoneDrag-and-drop file upload zone component.
File TreeFile browser tree with icons, expand/collapse, and selection.
Filter BarFilter bar component with filter controls.
Form ArrayStyle-agnostic form array component.
Form GroupForm group wrapper component.
Form ValidationRenders inline validation error for a single form field.
Gantt ChartSVG Gantt chart for project management timelines.
GaugeSVG donut/gauge chart component.
HeatmapStyle-agnostic SVG heatmap using CSS custom properties.
Hover CardStyle-agnostic hover card using CSS custom properties.
IconIcon component wrapper.
Image CropperDrag-to-crop image component with optional aspect ratio lock.
Image LightboxFull-screen image viewer overlay with navigation.
Image Upload PreviewMulti-image upload with thumbnail preview.
Import WizardStyle-agnostic import wizard component.
Infinite ScrollStyle-agnostic infinite scroll component.
Inline EditInline edit component for in-place text editing.
Input
Input GroupInput group wrapper component (prefix/suffix addons).
Json ViewerInteractive collapsible JSON tree viewer.
Kanban BoardKanban board component.
KbdKeyboard shortcut display component.
Line ChartStyle-agnostic SVG line chart using CSS custom properties.
Live CounterAnimated counter updating in real-time via WebSocket push.
Live IndicatorShows 'Alice is typing...' style indicator per field.
Loading OverlayLoading overlay component.
Log ViewerMonospace streaming log display with level coloring.
Map PickerClick-to-pick location on a Leaflet/OSM map.
MarkdownRender Markdown text as sanitized HTML.
Markdown EditorSplit-pane markdown editor with live preview.
Markdown TextareaStyle-agnostic textarea with markdown preview toggle.
Masonry GridPinterest-style masonry grid layout.
Mentions InputText input that triggers a user mention dropdown on @ character.
MeterStyle-agnostic meter / stacked progress component.
ModalModal dialog overlay component.
Model SelectorRich select for AI model selection with metadata display.
Multi SelectMulti-select checkbox list component.
Multimodal InputText area with optional file attachment and voice input buttons.
Nav
Nav Group
Nav Item
Nav MenuHorizontal navigation menu component.
Notification BadgeStyle-agnostic notification badge using CSS custom properties.
Notification CenterNotification bell with dropdown list component.
Notification PopoverStyle-agnostic notification popover using CSS custom properties.
Number StepperNumeric +/- stepper input component.
Org ChartHierarchical org chart / tree visualization.
Otp InputOne-time code input component.
Page AlertStyle-agnostic full-width page alert / banner component.
Page HeaderPage-level header with title, subtitle, and optional actions.
PaginationPagination controls component.
Pie ChartStyle-agnostic SVG pie/donut chart using CSS custom properties.
Pivot TableConfigurable pivot table that aggregates data by row/column dimensions.
PopoverPopover overlay component.
Presence AvatarsStacked avatar group showing online/present users with status dots.
ProgressStyle-agnostic progress bar component using CSS custom properties.
Progress CircleStyle-agnostic circular progress indicator using SVG stroke-dasharray.
Prompt EditorTemplate editing with {{variable}} highlighting.
Qr CodePure SVG QR code generator.
Radio
RatingStar rating component.
ReactionsSlack-style emoji reactions with live-updating counts.
Relative TimeDisplays a datetime as relative text ("3 hours ago") with optional
Resizable PanelContainer with a drag-to-resize handle.
Responsive ImagePicture element with srcset, lazy loading, and blur-up placeholder.
RibbonCorner ribbon overlay badge.
Rich SelectSelect dropdown where each option can include icons, images, descriptions,
Rich Text EditorBasic rich text editor component (contenteditable + toolbar).
Scroll AreaScrollable area container component.
Scroll SpyStyle-agnostic scroll spy component.
Scroll To TopFloating scroll-to-top button that appears after a scroll threshold.
Segmented ProgressStyle-agnostic segmented progress bar with labeled steps.
Select
Server Event Toast
SheetSheet/drawer overlay component.
SidebarSidebar navigation component.
Sidebar Nav
Signature PadCanvas-based signature capture pad.
SkeletonSkeleton loading placeholder component.
Skeleton FactoryStyle-agnostic skeleton loading state generator.
Sortable Grid2D drag-and-drop grid layout.
Sortable ListDrag-and-drop reorderable list.
Source CitationInline footnote marker with hover popover showing source details.
SparklineStyle-agnostic inline sparkline using SVG.
SpinnerStyle-agnostic spinner component using CSS custom properties.
Split ButtonSplit button with primary action and dropdown menu.
Split PaneSplit pane/resizable layout component.
Stat CardStyle-agnostic stat card component using CSS custom properties.
Status DotStyle-agnostic animated status indicator dot using CSS custom properties.
Status IndicatorStyle-agnostic status indicator with colored dot and optional label.
StepperStep indicator/wizard progress component.
Sticky HeaderSticky header component.
Streaming TextRenders text arriving incrementally via WebSocket with typing cursor.
SwitchStyle-agnostic toggle switch component using CSS custom properties.
Table
Table Of ContentsTable of contents navigation component.
TabsTab navigation component.
TagStyle-agnostic tag/chip component using CSS custom properties.
Tag InputTag input component for adding/removing tags.
TerminalMonospace terminal emulator display with ANSI color support.
Textarea
Theme ToggleLight/dark/system theme toggle component.
Thinking IndicatorAnimated status indicator for AI processing states.
Time PickerStyle-agnostic time picker component using CSS custom properties.
TimelineTimeline component.
ToastStyle-agnostic toast notification component using CSS custom properties.
Toggle GroupSegmented toggle button group component.
Token CounterCompact progress display showing token usage versus limit.
ToolbarToolbar component with button groups.
TooltipTooltip component.
TourProduct tour with spotlight highlights and step navigation.
Tree ViewExpandable tree view component.
TreemapStyle-agnostic SVG treemap using CSS custom properties.
Truncated ListStyle-agnostic truncated list component.
Virtual ListPaginated virtual list component.
Voice InputMic button with recording animation for speech input.
WizardStyle-agnostic multi-step form wizard using CSS custom properties.

NOT_SUPPLIED means omit the argument to use the component's default behaviour.

A

Accordion

Accordion/collapsible sections component.

python · Core UI · from djust.components import Accordion · Open it live

Accordion(items=None, active='', event='accordion_toggle', custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemslist | NoneNonelist of dicts with keys: id, title, content
activestr''id of currently open item
eventstr'accordion_toggle'dj-click event name
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: accordion_toggle. Give the component a name when a page holds more than one; the handler receives it as name.

Activity Feed

Real-time activity feed with streaming support.

python · Data Display · from djust.components import ActivityFeed · Open it live

ActivityFeed(events=None, stream_event='', max_items=50, custom_class='', **kwargs)
ParameterTypeDefaultDescription
eventsList[dict] | NoneNoneList of event dicts with user, action, target, time, avatar.
stream_eventstr''WebSocket event name for live updates.
max_itemsint50Maximum number of visible items (default: 50).
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs a client hook djust does not ship: dj-hook="ActivityFeed". The markup renders, but the interaction is yours to add — register window.djust.hooks.ActivityFeed (see hooks).

Agent Step

AI agent tool-use step card.

python · Feedback · from djust.components import AgentStep · Open it live

AgentStep(tool='', status='pending', content='', duration='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
toolstr''Tool/function name.
statusstr'pending'Step status (pending, running, complete, error).
contentstr''Step result content (plain text).
durationstr''Execution duration text (e.g. "1.2s").
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Alert

Style-agnostic alert component using CSS custom properties.

template · Core UI · Open it live

{% theme_alert message=... title=... variant=... dismissible=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
messagestrrequiredAlert text content
titlestr | NoneNone
variantstrdefaultColor variant (info, success, warning, danger)
dismissibleboolFalseWhether the alert can be dismissed
css_prefixstr``
attrsdictNone
slot_iconstrNone
slot_messagestrNone
slot_actionsstrNone
slot_dismissstrNone

Or as a Python component — from djust.components import Alert:

Alert(message, variant='info', dismissible=False, action=None, icon=None, custom_class='', **kwargs)

Slots: slot_icon, slot_message, slot_actions, slot_dismiss

Accessibility: Alert container must have role=alert.

Animated Number

Animated counting number display.

python · Advanced · from djust.components import AnimatedNumber · Open it live

AnimatedNumber(value=0, prefix='', suffix='', duration=800, decimals=0, separator=',', custom_class='', **kwargs)
ParameterTypeDefaultDescription
valuefloat0Target numeric value.
prefixstr''Text before the number (e.g. "$").
suffixstr''Text after the number (e.g. "%").
durationint800Animation duration in ms (default: 800).
decimalsint0Number of decimal places (default: 0).
separatorstr','Thousands separator (default: ",").
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs a client hook djust does not ship: dj-hook="AnimatedNumber". The markup renders, but the interaction is yours to add — register window.djust.hooks.AnimatedNumber (see hooks).

Announcement Bar

Announcement/banner bar component.

python · Advanced · from djust.components import AnnouncementBar · Open it live

AnnouncementBar(content='', variant='info', dismissible=False, dismiss_event='dismiss_announcement', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''bar content (pre-rendered HTML)
variantstr'info'info, warning, danger, success
dismissibleboolFalsewhether bar can be dismissed
dismiss_eventstr'dismiss_announcement'dj-click event name
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: dismiss_announcement. Give the component a name when a page holds more than one; the handler receives it as name.

App Shell

Application shell layout component.

python · Layout · from djust.components import AppShell · Open it live

AppShell(sidebar='', header='', content='', variant='default', custom_class='', **kwargs)
ParameterTypeDefaultDescription
sidebarstr''sidebar content (pre-rendered HTML)
headerstr''header content (pre-rendered HTML)
contentstr''main content (pre-rendered HTML)
variantstr'default'default, compact
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Approval Gate

Inline confirmation card for AI agent actions with risk levels.

python · Feedback · from djust.components import ApprovalGate · Open it live

ApprovalGate(message='', risk='medium', approve_event='approve', reject_event='reject', approve_label='Approve', reject_label='Reject', custom_class='', **kwargs)
ParameterTypeDefaultDescription
messagestr''Description of the action requiring approval
riskstr'medium'Risk level (low, medium, high, critical)
approve_eventstr'approve'djust event fired on approval
reject_eventstr'reject'djust event fired on rejection
approve_labelstr'Approve'Label for approve button (default: "Approve")
reject_labelstr'Reject'Label for reject button (default: "Reject")
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: reject, approve. Give the component a name when a page holds more than one; the handler receives it as name.

Aspect Ratio

Aspect ratio container component.

python · Media · from djust.components import AspectRatio · Open it live

AspectRatio(content='', ratio='16/9', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''contained content (pre-rendered HTML)
ratiostr'16/9'CSS aspect-ratio value (e.g. '16/9')
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Audit Log

Style-agnostic audit log table component.

python · Data Display · from djust.components import AuditLog · Open it live

AuditLog(entries=None, stream_event='', columns=None, allowed_actions=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
entrieslist | NoneNoneList of entry dicts with timestamp, user, action, resource, detail
stream_eventstr''djust event for new entry streaming
columnslist | NoneNoneList of column names to show (default: all)
allowed_actionsset | NoneNoneSet of action values permitted for CSS class injection (default: create, read, update, delete, login, logout, export, import, approve, reject)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Avatar

Avatar component with optional status indicator.

template · Core UI · Open it live

{% theme_avatar src=... alt=... name=... size=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
srcstr | NoneNoneimage URL
altstr``alt text
namestr``
sizestrmdxs, sm, md, lg, xl
css_prefixstr``
attrsdictNone
slot_imagestrNone
slot_fallbackstrNone

Or as a Python component — from djust.components import Avatar:

Avatar(src='', alt='', initials='', size='md', status='', custom_class='', **kwargs)

Slots: slot_image, slot_fallback

Avatar Group

Style-agnostic avatar group using CSS custom properties.

python · Media · from djust.components import AvatarGroup · Open it live

AvatarGroup(users=None, max_display=5, size='md', custom_class='', **kwargs)
ParameterTypeDefaultDescription
usersList[Union[dict, object]] | NoneNoneList of user dicts (name, avatar/src) or objects with get_full_name() and optional avatar attribute.
max_displayint5Maximum avatars shown before "+N" overflow (default: 5).
sizestr'md'Size variant (sm, md, lg).
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

B

Badge

Style-agnostic badge component using CSS custom properties.

template · Core UI · Open it live

{% theme_badge text=... variant=... css_prefix=... attrs=... slot_content=... %}
ParameterTypeDefaultDescription
textstrrequired
variantstrdefaultColor variant (default, success, info, warning, danger, muted)
css_prefixstr``
attrsdictNone
slot_contentstrNone

Or as a Python component — from djust.components import Badge:

Badge(label, variant='default', size='md', custom_class='', **kwargs)

Slots: slot_content

Bar Chart

Style-agnostic SVG bar chart using CSS custom properties.

python · Charts · from djust.components import BarChart · Open it live

BarChart(data=None, labels=None, title=None, width=400, height=250, color='', show_values=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
datalist | NoneNoneList of numeric values
labelslist | NoneNoneList of category labels
titlestr | NoneNoneOptional chart title
widthint400SVG width (default: 400)
heightint250SVG height (default: 250)
colorstr''Bar fill color
show_valuesboolTrueShow value labels above bars
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Bottom Sheet

Style-agnostic bottom sheet / drawer component.

python · Layout · from djust.components import BottomSheet · Open it live

BottomSheet(title='', open=False, close_event='close_sheet', custom_class='', content='', **kwargs)
ParameterTypeDefaultDescription
titlestr''Sheet title text
openboolFalseWhether the sheet is visible
close_eventstr'close_sheet'djust event for closing
custom_classstr''Additional CSS classes
contentstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: close_sheet. Give the component a name when a page holds more than one; the handler receives it as name.

Breadcrumb navigation component.

template · Navigation · Open it live

{% theme_breadcrumb items=... separator=... css_prefix=... attrs=... slot_separator=... %}
ParameterTypeDefaultDescription
itemslistrequiredlist of dicts with keys: label, url, active (bool)
separatorstr/
css_prefixstr``
attrsdictNone
slot_separatorstrNone

Or as a Python component — from djust.components import Breadcrumb:

Breadcrumb(items=None, custom_class='', **kwargs)

Slots: slot_separator

Accessibility: Breadcrumb nav must have aria-label=Breadcrumb.

Breadcrumb navigation with overflow collapse into dropdown.

python · Navigation · from djust.components import BreadcrumbDropdown · Open it live

BreadcrumbDropdown(items=None, max_visible=4, separator='/', custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemsList[dict] | NoneNoneList of dicts with label, optional url.
max_visibleint4Max items before collapsing (default: 4).
separatorstr'/'Separator character (default: "/").
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Button

Style-agnostic button component using CSS custom properties.

template · Core UI · Open it live

{% theme_button text=... variant=... size=... css_prefix=... attrs=... slot_icon=... %}
ParameterTypeDefaultDescription
textstrrequired
variantstrprimaryStyle variant (primary, secondary, danger, success, ghost, link, text)
sizestrmdSize variant (sm, md, lg)
css_prefixstr``
attrsdictNone
slot_iconstrNone
slot_contentstrNone
slot_loadingstrNone

Or as a Python component — from djust.components import Button:

Button(label, variant='primary', action=None, data=None, onclick=None, icon=None, icon_position='left', size='md', disabled=False, loading=False, type='button', custom_class='', **kwargs)

Slots: slot_icon, slot_content, slot_loading

C

Calendar Heatmap

Style-agnostic SVG calendar heatmap (GitHub contribution style).

python · Charts · from djust.components import CalendarHeatmap · Open it live

CalendarHeatmap(data=None, year=None, title=None, color_empty='#ebedf0', color_min='#9be9a8', color_max='#216e39', cell_size=12, cell_gap=2, show_month_labels=True, show_day_labels=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
datadict | NoneNoneDict mapping "YYYY-MM-DD" strings to numeric values
yearint | NoneNoneYear to display (default: current year)
titlestr | NoneNoneOptional chart title
color_emptystr'#ebedf0'Color for zero-value cells (default: "#ebedf0")
color_minstr'#9be9a8'Color for low values (default: "#9be9a8")
color_maxstr'#216e39'Color for high values (default: "#216e39")
cell_sizeint12Cell width/height in px (default: 12)
cell_gapint2Gap between cells in px (default: 2)
show_month_labelsboolTrueShow month labels (default: True)
show_day_labelsboolTrueShow day-of-week labels (default: True)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Calendar View

Month/week/day calendar view with event slots.

python · Charts · from djust.components import CalendarView · Open it live

CalendarView(events=None, month=1, year=2026, view='month', start_day=0, event='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
eventslist | NoneNoneList of dicts with date (YYYY-MM-DD), title, optional color
monthint1Month number (1-12)
yearint2026Four-digit year
viewstr'month'"month", "week", or "day" (default: "month")
start_dayint0First day of week, 0=Mon 6=Sun (default: 0)
eventstr''djust click event for day cells
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Callout

Callout/blockquote component.

python · Core UI · from djust.components import Callout · Open it live

Callout(content='', variant='default', title='', icon='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''callout body (pre-rendered HTML)
variantstr'default'default, info, warning, danger, success
titlestr''optional title text
iconstr''optional icon text
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Card

Style-agnostic card container using CSS custom properties.

template · Core UI · Open it live

{% theme_card title=... content=... footer=... css_prefix=... attrs=... slot_header=... %}
ParameterTypeDefaultDescription
titlestr | NoneNone
contentstr``Main card content (required)
footerstr | NoneNoneOptional footer content
css_prefixstr``
attrsdictNone
slot_headerstrNone
slot_bodystrNone
slot_footerstrNone

Or as a Python component — from djust.components import Card:

Card(content='', header=None, footer=None, image=None, variant='default', hover=False, padding='md', action=None, data=None, custom_class='', **kwargs)

Slots: slot_header, slot_body, slot_footer

Image carousel/slideshow component.

python · Media · from djust.components import Carousel · Open it live

Carousel(images=None, active=0, prev_event='carousel_prev', next_event='carousel_next', go_event='carousel_go', custom_class='', **kwargs)
ParameterTypeDefaultDescription
imageslist | NoneNonelist of dicts with keys: src, alt, caption
activeint00-based index of active slide prev_event, next_event, go_event: dj-click events
prev_eventstr'carousel_prev'
next_eventstr'carousel_next'
go_eventstr'carousel_go'
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: carousel_prev, carousel_next, carousel_go. Give the component a name when a page holds more than one; the handler receives it as name.

Chat Bubble

Single chat message bubble with sender avatar, timestamp, and delivery status.

python · Advanced · from djust.components import ChatBubble · Open it live

ChatBubble(message=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
messageDict | NoneNoneDict with keys: sender, name, text, time, avatar (optional), status (optional). sender="user" renders right-aligned; anything else renders left-aligned. status can be: "sending", "sent", "delivered", "read", "error".
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Checkbox

template · Core UI · Open it live

{% theme_checkbox name=... label=... description=... css_prefix=... attrs=... slot_label=... %}
ParameterTypeDefaultDescription
namestrrequired
labelstr``
descriptionstr | NoneNone
css_prefixstr``
attrsdictNone
slot_labelstrNone
slot_descriptionstrNone

Slots: slot_label, slot_description

Accessibility: Label must reference checkbox via for attribute.

Code Block

Code block with syntax highlighting component.

python · Data Display · from djust.components import CodeBlock · Open it live

CodeBlock(code='', language='', filename='', theme='github-dark', custom_class='', **kwargs)
ParameterTypeDefaultDescription
codestr''source code text
languagestr''programming language
filenamestr''optional filename display
themestr'github-dark'highlight.js theme name
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Code Snippet

Code block with copy button and language badge.

python · Core UI · from djust.components import CodeSnippet · Open it live

CodeSnippet(code='', language='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
codestr''The source code text
languagestr''Programming language label (e.g. "python", "bash")
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/code-snippet.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Collab Selection

Highlights text or cell ranges selected by other users.

python · Advanced · from djust.components import CollabSelection · Open it live

CollabSelection(users=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
usersList[Union[dict, object]] | NoneNoneList of user dicts with name, color, and selection data.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs a client hook djust does not ship: dj-hook="CollabSelection". The markup renders, but the interaction is yours to add — register window.djust.hooks.CollabSelection (see hooks).

Collapsible

Collapsible/expandable section component.

python · Core UI · from djust.components import Collapsible · Open it live

Collapsible(trigger='Toggle', content='', is_open=False, event='toggle_collapsible', custom_class='', **kwargs)
ParameterTypeDefaultDescription
triggerstr'Toggle'trigger button text
contentstr''collapsible body (pre-rendered HTML)
is_openboolFalsewhether section is open
eventstr'toggle_collapsible'dj-click event name
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_collapsible. Give the component a name when a page holds more than one; the handler receives it as name.

Color Picker

Color picker with swatches component.

python · Forms · from djust.components import ColorPicker · Open it live

ColorPicker(name='', value='#3B82F6', event='', label='', swatches=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''form field name
valuestr'#3B82F6'current hex color value
eventstr''dj-click/dj-input event name
labelstr''label text
swatcheslist | NoneNonelist of hex color strings
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: set_color.

Combobox

Searchable select (combobox) component.

python · Forms · from djust.components import Combobox · Open it live

Combobox(name='', label='', value='', options=None, event='', search_event='', placeholder='Search...', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''form field name
labelstr''label text
valuestr''currently selected value
optionslist | NoneNonelist of dicts with keys: value, label
eventstr''dj-change event name
search_eventstr''dj-input event for search
placeholderstr'Search...'search input placeholder
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: language_search, set_language.

Command Palette

Command palette/search overlay component.

python · Advanced · from djust.components import CommandPalette · Open it live

CommandPalette(content='', is_open=False, search_event='palette_search', close_event='close_palette', placeholder='Search commands...', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''results content (pre-rendered HTML)
is_openboolFalsewhether palette is open
search_eventstr'palette_search'dj-input event for search
close_eventstr'close_palette'dj-click event to close
placeholderstr'Search commands...'search input placeholder
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: close_palette, palette_search. Give the component a name when a page holds more than one; the handler receives it as name.

Comparison Table

Feature comparison table for SaaS plans / product tiers.

python · Data Display · from djust.components import ComparisonTable · Open it live

ComparisonTable(plans=None, features=None, event='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
planslist | NoneNoneList of dicts with name, optional price, highlighted
featureslist | NoneNoneList of dicts with name and values (list matching plans order). Boolean values render as check/cross marks.
eventstr''djust click event for plan selection
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Connection Status

Slim bar showing WebSocket state.

python · Feedback · from djust.components import ConnectionStatus · Open it live

ConnectionStatus(reconnecting_text='Reconnecting...', connected_text='Reconnected', custom_class='', **kwargs)
ParameterTypeDefaultDescription
reconnecting_textstr'Reconnecting...'Text shown while reconnecting
connected_textstr'Reconnected'Text shown briefly after reconnection
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/connection-status.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Content Loader

Style-agnostic content loader / suspense component.

python · Feedback · from djust.components import ContentLoader · Open it live

ContentLoader(loading_event='data_loaded', loaded=False, placeholder='', content='', error='', error_event='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
loading_eventstr'data_loaded'Server event name that signals content is ready
loadedboolFalseWhether content has loaded (default: False)
placeholderstr''HTML string to show while loading (e.g. skeleton)
contentstr''Actual content to show when loaded
errorstr''Error message to display if loading failed
error_eventstr''Optional event name for retry action
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Context Menu

Context menu (right-click menu) component.

python · Advanced · from djust.components import ContextMenu · Open it live

ContextMenu(label='Right-click area', content='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
labelstr'Right-click area'trigger area text
contentstr''menu items (pre-rendered HTML)
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Conversation Thread

Chat-style message thread with sender avatars, timestamps, and grouping.

python · Advanced · from djust.components import ConversationThread · Open it live

ConversationThread(messages=None, stream_event='new_message', streaming=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
messagesList[Dict] | NoneNoneList of message dicts with keys: sender, name, text, time
stream_eventstr'new_message'WebSocket event name for incoming messages
streamingboolFalseWhether the AI is currently streaming a response
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Style-agnostic cookie consent banner.

python · Advanced · from djust.components import CookieConsent · Open it live

CookieConsent(message='We use cookies to improve your experience.', accept_event='accept_cookies', reject_event='', accept_label='Accept', reject_label='Decline', privacy_url='', show_reject=True, position='bottom', custom_class='', **kwargs)
ParameterTypeDefaultDescription
messagestr'We use cookies to improve your experience.'Consent message text
accept_eventstr'accept_cookies'djust event for accepting cookies
reject_eventstr''djust event for rejecting cookies (optional)
accept_labelstr'Accept'Accept button text (default: "Accept")
reject_labelstr'Decline'Reject button text (default: "Decline")
privacy_urlstr''Link to privacy policy
show_rejectboolTrueShow reject button (default: True)
positionstr'bottom'Position variant (bottom, top)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: accept_cookies. Give the component a name when a page holds more than one; the handler receives it as name.

Copy Button

Copy-to-clipboard button component.

python · Advanced · from djust.components import CopyButton · Open it live

CopyButton(text='', label='Copy', copied_label='Copied!', variant='outline', size='sm', custom_class='', **kwargs)
ParameterTypeDefaultDescription
textstr''text to copy
labelstr'Copy'button label
copied_labelstr'Copied!'label shown after copying
variantstr'outline'button style variant
sizestr'sm'button size
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Copyable Text

Inline click-to-copy text with "Copied!" tooltip feedback.

python · Advanced · from djust.components import CopyableText · Open it live

CopyableText(text='', copied_label='Copied!', custom_class='', **kwargs)
ParameterTypeDefaultDescription
textstr''The text to display and copy
copied_labelstr'Copied!'Label shown after copy (default "Copied!")
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/copyable-text.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Countdown

Style-agnostic countdown timer component.

python · Advanced · from djust.components import Countdown · Open it live

Countdown(target='', event='', show_days=True, show_seconds=True, labels=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
targetstr''ISO 8601 datetime string for countdown target
eventstr''djust event to fire when countdown reaches zero
show_daysboolTrueShow days segment (default: True)
show_secondsboolTrueShow seconds segment (default: True)
labelsdict | NoneNoneDict of custom labels for segments
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/countdown.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Cron Input

Visual cron expression builder with human-readable preview.

python · Forms · from djust.components import CronInput · Open it live

CronInput(name='cron', value='* * * * *', event='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'cron'Form field name.
valuestr'* * * * *'Cron expression string (default: "* * * * *").
eventstr''Event fired on change.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Currency Input

Numeric input with currency symbol prefix and formatting hints.

python · Forms · from djust.components import CurrencyInput · Open it live

CurrencyInput(name='', currency='USD', value='', label='', min=None, max=None, step='0.01', placeholder='0.00', event='', disabled=False, required=False, error='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''Form field name.
currencystr'USD'Currency code (USD, EUR, GBP, etc.).
valuestr''Current numeric value.
labelstr''Optional label text.
minfloat | NoneNoneMinimum value.
maxfloat | NoneNoneMaximum value.
stepstr'0.01'Step increment (default 0.01).
placeholderstr'0.00'Placeholder text.
eventstr''dj-input event name.
disabledboolFalseWhether the input is disabled.
requiredboolFalseWhether the field is required.
errorstr''Error message to display.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Cursors Overlay

Overlay showing other users' cursor positions in real-time.

python · Advanced · from djust.components import CursorsOverlay · Open it live

CursorsOverlay(users=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
usersList[Union[dict, object]] | NoneNoneList of user dicts with name, color, x, y.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs a client hook djust does not ship: dj-hook="CursorsOverlay". The markup renders, but the interaction is yours to add — register window.djust.hooks.CursorsOverlay (see hooks).

D

Dashboard Grid

CSS Grid layout with draggable and resizable dashboard panels.

python · Layout · from djust.components import DashboardGrid · Open it live

DashboardGrid(panels=None, columns=4, row_height='200px', gap='1rem', move_event='dashboard_move', resize_event='dashboard_resize', custom_class='', **kwargs)
ParameterTypeDefaultDescription
panelslist | NoneNonelist of panel dicts with id, title, col, row, width, height, content
columnsint4number of grid columns (default 4)
row_heightstr'200px'CSS row height (default "200px")
gapstr'1rem'CSS gap (default "1rem")
move_eventstr'dashboard_move'djust event on panel drag
resize_eventstr'dashboard_resize'djust event on panel resize
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: dashboard_move, dashboard_resize. Give the component a name when a page holds more than one; the handler receives it as name.

Needs a client hook djust does not ship: dj-hook="DashboardGrid". The markup renders, but the interaction is yours to add — register window.djust.hooks.DashboardGrid (see hooks).

Data Card Grid

Filterable card grid layout.

python · Data Display · from djust.components import DataCardGrid · Open it live

DataCardGrid(items=None, columns=3, filter_key='category', event='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemsList[dict] | NoneNoneList of item dicts with title, description, category, image, url.
columnsint3Number of columns (default: 3).
filter_keystr'category'Key in items used for filtering (default: "category").
eventstr''Event fired on card click.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Data Grid

Editable spreadsheet-like data grid with cell editing, column resize,

python · Data Display · from djust.components import DataGrid · Open it live

DataGrid(columns=None, rows=None, row_key='id', edit_event='grid_cell_edit', resizable=True, frozen_left=0, frozen_right=0, striped=False, compact=False, keyboard_nav=True, new_row_event='', delete_row_event='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
columnslist | NoneNonelist of dicts with keys: key, label, width (opt), editable (bool, default True), type (text|number|select), options (for select type)
rowslist | NoneNonelist of dicts keyed by column keys
row_keystr'id'key field for row identity
edit_eventstr'grid_cell_edit'dj-click event on cell edit commit
resizableboolTrueenable column resize handles
frozen_leftint0columns frozen on the left
frozen_rightint0columns frozen on the right
stripedboolFalsealternating row backgrounds
compactboolFalsereduced cell padding
keyboard_navboolTrueenable arrow-key cell navigation
new_row_eventstr''event for Add Row button
delete_row_eventstr''event for row deletion
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: grid_cell_edit. Give the component a name when a page holds more than one; the handler receives it as name.

Needs its script: add <script src="{% static 'djust_components/data-grid.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Data Table

Data table component for tabular data display.

python · Data Display · from djust.components import DataTable · Open it live

DataTable(columns=None, rows=None, sort_by='', sort_desc=False, sort_event='on_table_sort', striped=False, compact=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
columnslist | NoneNonelist of dicts with keys: key, label
rowslist | NoneNonelist of dicts keyed by column keys
sort_bystr''column key to sort by
sort_descboolFalsesort descending
sort_eventstr'on_table_sort'dj-click event for sorting
stripedboolFalsealternating row backgrounds
compactboolFalsereduced padding
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: on_table_sort. Give the component a name when a page holds more than one; the handler receives it as name.

Needs its script: add <script src="{% static 'djust_components/data-table.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Date Picker

Server-rendered calendar date picker component.

python · Forms · from djust.components import DatePicker · Open it live

DatePicker(name='date', label='', selected='', year=0, month=0, prev_event='date_prev_month', next_event='date_next_month', select_event='date_select', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'date'form field name
labelstr''label text
selectedstr''selected date (YYYY-MM-DD)
yearint0display year
monthint0display month prev_event, next_event, select_event: dj-click events
prev_eventstr'date_prev_month'
next_eventstr'date_next_month'
select_eventstr'date_select'
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: date_prev_month, date_next_month, date_select.

Dependent Select

Cascading dropdown that reloads options when a parent field changes.

python · Forms · from djust.components import DependentSelect · Open it live

DependentSelect(name='', parent='', source_event='', label='', placeholder='Select...', value='', options=None, loading=False, disabled=False, required=False, error='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''Form field name.
parentstr''Name of the parent field this select depends on.
source_eventstr''djust event to fire when parent changes.
labelstr''Optional label text.
placeholderstr'Select...'Placeholder text when nothing selected.
valuestr''Currently selected value.
optionslist | NoneNoneList of dicts with 'value'/'label' keys, or list of strings.
loadingboolFalseShow spinner while loading options.
disabledboolFalseWhether the select is disabled.
requiredboolFalseWhether the field is required.
errorstr''Error message to display.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Description List

Description list (term/detail pairs) component.

python · Data Display · from djust.components import DescriptionList · Open it live

DescriptionList(items=None, layout='vertical', custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemslist | NoneNonelist of dicts with keys: term, detail
layoutstr'vertical'vertical, horizontal
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Diff Viewer

Side-by-side or unified text diff viewer.

python · Data Display · from djust.components import DiffViewer · Open it live

DiffViewer(old='', new='', mode='split', title_old='Original', title_new='Modified', show_line_numbers=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
oldstr''Original text
newstr''Modified text
modestr'split'"split" or "unified" (default: "split")
title_oldstr'Original'Label for old pane (default: "Original")
title_newstr'Modified'Label for new pane (default: "Modified")
show_line_numbersboolTrueShow line numbers (default: True)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Dropdown menu component.

template · Core UI · Open it live

{% theme_dropdown id=... label=... align=... css_prefix=... attrs=... slot_trigger=... %}
ParameterTypeDefaultDescription
idstrrequired
labelstrrequiredtrigger button text
alignstrleft
css_prefixstr``
attrsdictNone
slot_triggerstrNone
slot_menustrNone

Or as a Python component — from djust.components import Dropdown:

Dropdown(label='Menu', content='', is_open=False, toggle_event='toggle_dropdown', variant='default', custom_class='', **kwargs)

Events sent to your view: toggle_dropdown.

Slots: slot_trigger, slot_menu

Accessibility: Trigger must have aria-haspopup=true; Trigger must have aria-expanded.

Style-agnostic dropdown menu component.

python · Core UI · from djust.components import DropdownMenu · Open it live

DropdownMenu(label='Menu', items=None, open=False, toggle_event='toggle_menu', align='left', custom_class='', **kwargs)
ParameterTypeDefaultDescription
labelstr'Menu'Trigger button label
itemslist | NoneNoneList of menu item dicts
openboolFalseWhether the menu is expanded
toggle_eventstr'toggle_menu'djust event for toggling open/close
alignstr'left'Menu alignment (left, right)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_menu. Give the component a name when a page holds more than one; the handler receives it as name.

E

Empty State

Empty state placeholder component.

python · Feedback · from djust.components import EmptyState · Open it live

EmptyState(title='', description='', icon='', action_label='', action_event='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
titlestr''heading text
descriptionstr''descriptive text
iconstr''optional icon
action_labelstr''CTA button text
action_eventstr''dj-click event for CTA
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Error Boundary

Style-agnostic error boundary component.

python · Feedback · from djust.components import ErrorBoundary · Open it live

ErrorBoundary(fallback='Something went wrong', error='', retry_event='', custom_class='', content='', **kwargs)
ParameterTypeDefaultDescription
fallbackstr'Something went wrong'Fallback message to show on error
errorstr''Current error message (empty = no error)
retry_eventstr''djust event for retrying
custom_classstr''Additional CSS classes
contentstr''What to show while there is no error — plain text, escaped
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Error Page

Styled error page with code, title, message, and action.

python · Feedback · from djust.components import ErrorPage · Open it live

ErrorPage(code=500, title='Something went wrong', message='', action_url='/', action_label='Go Home', custom_class='', **kwargs)
ParameterTypeDefaultDescription
codeint500HTTP error code (e.g. 404, 500).
titlestr'Something went wrong'Error title.
messagestr''Error description.
action_urlstr'/'URL for the action button.
action_labelstr'Go Home'Label for the action button.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Expandable Text

Style-agnostic expandable text component using CSS line-clamp.

python · Data Display · from djust.components import ExpandableText · Open it live

ExpandableText(text='', max_lines=3, expanded=False, toggle_event='toggle_expand', more_label='Read more', less_label='Show less', custom_class='', **kwargs)
ParameterTypeDefaultDescription
textstr''Text content to display
max_linesint3Maximum visible lines when collapsed (default: 3)
expandedboolFalseWhether text is currently expanded (default: False)
toggle_eventstr'toggle_expand'djust event to toggle expanded state
more_labelstr'Read more'Label for expand action (default: "Read more")
less_labelstr'Show less'Label for collapse action (default: "Show less")
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_expand. Give the component a name when a page holds more than one; the handler receives it as name.

Export Dialog

Style-agnostic export dialog component.

python · Advanced · from djust.components import ExportDialog · Open it live

ExportDialog(formats=None, columns=None, event='export', open=False, close_event='close_export', selected_format='', title='Export Data', custom_class='', **kwargs)
ParameterTypeDefaultDescription
formatslist | NoneNoneList of available export formats
columnslist | NoneNoneList of column dicts with id, label, checked
eventstr'export'djust event for triggering export
openboolFalseWhether the dialog is visible
close_eventstr'close_export'djust event for closing
selected_formatstr''Currently selected format
titlestr'Export Data'Dialog title
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: close_export, export. Give the component a name when a page holds more than one; the handler receives it as name.

F

Fab

Floating action button component.

python · Layout · from djust.components import Fab · Open it live

Fab(icon='+', event='', position='bottom-right', label='', size='md', variant='primary', custom_class='', **kwargs)
ParameterTypeDefaultDescription
iconstr'+'icon text/emoji
eventstr''dj-click event name
positionstr'bottom-right'bottom-right, bottom-left, top-right, top-left
labelstr''accessible label
sizestr'md'sm, md, lg
variantstr'primary'primary, secondary, danger, success
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Feedback Widget

Thumbs up/down, star rating, or emoji feedback widget.

python · Advanced · from djust.components import FeedbackWidget · Open it live

FeedbackWidget(event='rate_response', mode='thumbs', value=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
eventstr'rate_response'djust event fired with rating value
modestr'thumbs'Rating mode (thumbs, stars, emoji)
valuestr | NoneNoneCurrent selected value (for thumbs: "up"/"down", stars: 1-5, emoji: the emoji)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: rate_response. Give the component a name when a page holds more than one; the handler receives it as name.

Fieldset

Fieldset with legend component.

python · Forms · from djust.components import Fieldset · Open it live

Fieldset(content='', legend='', disabled=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''fieldset content (pre-rendered HTML)
legendstr''legend text
disabledboolFalsewhether fieldset is disabled
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

File Dropzone

Drag-and-drop file upload zone component.

python · Media · from djust.components import FileDropzone · Open it live

FileDropzone(name='file', label='', accept='', multiple=False, max_size_mb=10, custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'file'file input name
labelstr''label text
acceptstr''accepted file types
multipleboolFalseallow multiple files
max_size_mbint10max file size in MB
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

File Tree

File browser tree with icons, expand/collapse, and selection.

python · Media · from djust.components import FileTree · Open it live

FileTree(nodes=None, selected='', event='select_file', show_icons=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
nodeslist | NoneNonelist of node dicts with name, type (file/folder), children
selectedstr''name/path of currently selected file
eventstr'select_file'djust event fired on file selection
show_iconsboolTrueshow file/folder icons (default True)
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: select_file. Give the component a name when a page holds more than one; the handler receives it as name.

Needs a client hook djust does not ship: dj-hook="FileTree". The markup renders, but the interaction is yours to add — register window.djust.hooks.FileTree (see hooks).

Filter Bar

Filter bar component with filter controls.

python · Advanced · from djust.components import FilterBar · Open it live

FilterBar(content='', clear_event='clear_filters', active_count=0, custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''filter controls (pre-rendered HTML)
clear_eventstr'clear_filters'dj-click event for clearing filters
active_countint0number of active filters
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: clear_filters. Give the component a name when a page holds more than one; the handler receives it as name.

Form Array

Style-agnostic form array component.

python · Forms · from djust.components import FormArray · Open it live

FormArray(name='items', rows=None, min=1, max=10, add_event='add_row', remove_event='remove_row', add_label='Add row', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'items'Field name prefix
rowslist | NoneNoneList of row dicts with values
minint1Minimum number of rows (default: 1)
maxint10Maximum number of rows (default: 10)
add_eventstr'add_row'djust event for adding a row
remove_eventstr'remove_row'djust event for removing a row
add_labelstr'Add row'Add button text
custom_classstr''Additional CSS classes
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: add_row, remove_row.

Form Group

Form group wrapper component.

python · Forms · from djust.components import FormGroup · Open it live

FormGroup(content='', label='', error='', helper='', required=False, for_input='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''form field content (pre-rendered HTML)
labelstr''label text
errorstr''error message
helperstr''helper text
requiredboolFalsewhether field is required
for_inputstr''id of the associated input
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Form Validation

Renders inline validation error for a single form field.

python · Forms · from djust.components import FieldError, FormErrors · Open it live

FieldError(field=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
fieldAnyNoneA Django BoundField instance.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

G

Gantt Chart

SVG Gantt chart for project management timelines.

python · Charts · from djust.components import GanttChart · Open it live

GanttChart(tasks=None, title=None, unit_label='Day', units=None, row_height=32, width=600, custom_class='', **kwargs)
ParameterTypeDefaultDescription
taskslist | NoneNoneList of dicts with name, start (unit offset), duration (units), optional color, progress (0-1)
titlestr | NoneNoneOptional chart title
unit_labelstr'Day'Label for time units (default: "Day")
unitsint | NoneNoneNumber of time units to display (auto-calculated if omitted)
row_heightint32Height per row in px (default: 32)
widthint600SVG width (default: 600)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Gauge

SVG donut/gauge chart component.

python · Charts · from djust.components import Gauge · Open it live

Gauge(value=0, max_value=100, label='', color='primary', size='md', show_value=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
valuefloat0current value
max_valuefloat100maximum value
labelstr''text label below gauge
colorstr'primary'color variant (primary, success, warning, danger)
sizestr'md'sm, md, lg
show_valueboolTruewhether to show percentage text
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

H

Heatmap

Style-agnostic SVG heatmap using CSS custom properties.

python · Charts · from djust.components import Heatmap · Open it live

Heatmap(data=None, x_labels=None, y_labels=None, title=None, color_min='#f0f9ff', color_max='#1e40af', cell_size=36, show_values=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
datalist | NoneNone2D list (rows of columns) of numeric values
x_labelslist | NoneNoneColumn header labels
y_labelslist | NoneNoneRow header labels
titlestr | NoneNoneOptional chart title
color_minstr'#f0f9ff'Color for minimum value (default: "#f0f9ff")
color_maxstr'#1e40af'Color for maximum value (default: "#1e40af")
cell_sizeint36Cell width/height in px (default: 36)
show_valuesboolTrueShow numeric values in cells (default: True)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Hover Card

Style-agnostic hover card using CSS custom properties.

python · Layout · from djust.components import HoverCard · Open it live

HoverCard(trigger='', content='', position='bottom', delay_in=200, delay_out=300, custom_class='', **kwargs)
ParameterTypeDefaultDescription
triggerstr''Text or HTML for the trigger element.
contentstr''HTML content for the card body.
positionstr'bottom'Placement relative to trigger (top, bottom, left, right).
delay_inint200Hover delay before showing (ms, default 200).
delay_outint300Delay before hiding after mouse leaves (ms, default 300).
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

I

Icon

Icon component wrapper.

python · Advanced · from djust.components import Icon · Open it live

Icon(name='', size='md', icon_set='heroicons', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''icon name
sizestr'md'xs, sm, md, lg
icon_setstr'heroicons'icon set name (default heroicons)
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Image Cropper

Drag-to-crop image component with optional aspect ratio lock.

python · Media · from djust.components import ImageCropper · Open it live

ImageCropper(src='', crop_event='save_crop', aspect_ratio='', min_width=50, min_height=50, disabled=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
srcstr''image URL to crop
crop_eventstr'save_crop'djust event fired with crop data (x, y, width, height)
aspect_ratiostr''lock ratio (e.g. "1/1", "16/9", "4/3"), empty = free
min_widthint50minimum crop width in px (default 50)
min_heightint50minimum crop height in px (default 50)
disabledboolFalsedisable cropping (default False)
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: save_crop. Give the component a name when a page holds more than one; the handler receives it as name.

Needs a client hook djust does not ship: dj-hook="ImageCropper". The markup renders, but the interaction is yours to add — register window.djust.hooks.ImageCropper (see hooks).

Image Lightbox

Full-screen image viewer overlay with navigation.

python · Media · from djust.components import ImageLightbox · Open it live

ImageLightbox(images=None, active=0, open=False, close_event='close_lightbox', navigate_event='lightbox_navigate', show_counter=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
imageslist | NoneNonelist of dicts with src and optional alt/caption
activeint0index of currently displayed image (default 0)
openboolFalsewhether lightbox is visible (default False)
close_eventstr'close_lightbox'djust event to close (default "close_lightbox")
navigate_eventstr'lightbox_navigate'djust event on nav (default "lightbox_navigate")
show_counterboolTrueshow "N of M" counter (default True)
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: close_lightbox, lightbox_navigate. Give the component a name when a page holds more than one; the handler receives it as name.

Needs a client hook djust does not ship: dj-hook="ImageLightbox". The markup renders, but the interaction is yours to add — register window.djust.hooks.ImageLightbox (see hooks).

Image Upload Preview

Multi-image upload with thumbnail preview.

python · Media · from djust.components import ImageUploadPreview · Open it live

ImageUploadPreview(name='images', max=5, event='upload', accept='image/*', previews=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'images'Form field name.
maxint5Maximum number of images.
eventstr'upload'Event fired on file selection.
acceptstr'image/*'Accepted MIME types (default: image/*).
previewslist | NoneNoneList of existing preview URLs.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: upload.

Needs a client hook djust does not ship: dj-hook="ImageUploadPreview". The markup renders, but the interaction is yours to add — register window.djust.hooks.ImageUploadPreview (see hooks).

Import Wizard

Style-agnostic import wizard component.

python · Advanced · from djust.components import ImportWizard · Open it live

ImportWizard(accepted_formats='.csv', model_fields=None, event='import_data', step='upload', upload_event='upload_file', custom_class='', **kwargs)
ParameterTypeDefaultDescription
accepted_formatsstr'.csv'Comma-separated accepted file extensions
model_fieldslist | NoneNoneList of field dicts with id, label
eventstr'import_data'djust event for triggering import
stepstr'upload'Current wizard step (upload, map, preview)
upload_eventstr'upload_file'djust event for file upload
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: upload_file, import_data. Give the component a name when a page holds more than one; the handler receives it as name.

Infinite Scroll

Style-agnostic infinite scroll component.

python · Advanced · from djust.components import InfiniteScroll · Open it live

InfiniteScroll(load_event='load_more', threshold='200px', loading=False, finished=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
load_eventstr'load_more'djust event to fire when threshold is reached
thresholdstr'200px'Distance from bottom to trigger (default: "200px")
loadingboolFalseWhether currently loading more items
finishedboolFalseWhether all items have been loaded
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: load_more. Give the component a name when a page holds more than one; the handler receives it as name.

Needs its script: add <script src="{% static 'djust_components/infinite-scroll.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Inline Edit

Inline edit component for in-place text editing.

python · Data Display · from djust.components import InlineEdit · Open it live

InlineEdit(value='', name='', event='', editing=False, edit_event='inline_edit', custom_class='', **kwargs)
ParameterTypeDefaultDescription
valuestr''current display value
namestr''field name
eventstr''dj-input event name
editingboolFalsewhether currently in edit mode
edit_eventstr'inline_edit'dj-click event to enter edit mode
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: inline_edit.

Input

template · Core UI · Open it live

{% theme_input name=... label=... placeholder=... type=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
namestrrequired
labelstr | NoneNone
placeholderstr``
typestrtext
css_prefixstr``
attrsdictNone
slot_labelstrNone
slot_inputstrNone
slot_help_textstrNone
slot_errorstrNone

Slots: slot_label, slot_input, slot_help_text, slot_error

Accessibility: Label must reference input via for attribute.

Input Group

Input group wrapper component (prefix/suffix addons).

python · Forms · from djust.components import InputGroup · Open it live

InputGroup(content='', size='md', error='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''input and addons (pre-rendered HTML)
sizestr'md'sm, md, lg
errorstr''error message
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

J

Json Viewer

Interactive collapsible JSON tree viewer.

python · Data Display · from djust.components import JsonViewer · Open it live

JsonViewer(data=None, collapsed_depth=2, root_label='root', copy_button=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
dataobjectNoneJSON-serializable data (dict, list, string, number, etc.)
collapsed_depthint2depth at which nodes start collapsed (default 2)
root_labelstr'root'label for root node
copy_buttonboolTrueshow copy-to-clipboard button (default True)
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs a client hook djust does not ship: dj-hook="JsonViewer". The markup renders, but the interaction is yours to add — register window.djust.hooks.JsonViewer (see hooks).

K

Kanban Board

Kanban board component.

python · Advanced · from djust.components import KanbanBoard · Open it live

KanbanBoard(columns=None, move_event='kanban_move', add_card_event='kanban_add_card', custom_class='', **kwargs)
ParameterTypeDefaultDescription
columnslist | NoneNonelist of dicts with keys: id, title, color, cards (list of dicts)
move_eventstr'kanban_move'dj-click event for drag-drop
add_card_eventstr'kanban_add_card'dj-click event for adding cards
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: kanban_add_card, kanban_move. Give the component a name when a page holds more than one; the handler receives it as name.

Kbd

Keyboard shortcut display component.

python · Core UI · from djust.components import Kbd · Open it live

Kbd(keys=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
keyslist | NoneNonelist of key strings (e.g. ['Ctrl', 'K'])
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

L

Line Chart

Style-agnostic SVG line chart using CSS custom properties.

python · Charts · from djust.components import LineChart · Open it live

LineChart(series=None, labels=None, title=None, width=400, height=250, area=False, show_dots=True, show_legend=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
serieslist | NoneNoneList of series dicts with name, data, and optional color
labelslist | NoneNoneList of x-axis labels
titlestr | NoneNoneOptional chart title
widthint400SVG width (default: 400)
heightint250SVG height (default: 250)
areaboolFalseFill area under lines (default: False)
show_dotsboolTrueShow data point dots (default: True)
show_legendboolTrueShow series legend (default: True)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Live Counter

Animated counter updating in real-time via WebSocket push.

python · Advanced · from djust.components import LiveCounter · Open it live

LiveCounter(value=0, label='', stream_event='counter_update', size='md', custom_class='', **kwargs)
ParameterTypeDefaultDescription
valueint0Current counter value
labelstr''Text label shown after the number
stream_eventstr'counter_update'WebSocket event name for counter updates
sizestr'md'Size variant (sm, md, lg)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/live-counter.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Live Indicator

Shows 'Alice is typing...' style indicator per field.

python · Feedback · from djust.components import LiveIndicator · Open it live

LiveIndicator(user=None, field='', action='typing', active=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
userobject | NoneNoneDict with name (and optional avatar) or string name.
fieldstr''Field name being edited.
actionstr'typing'Action label (default: "typing").
activeboolTrueWhether the indicator is visible (default: True).
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Loading Overlay

Loading overlay component.

python · Feedback · from djust.components import LoadingOverlay · Open it live

LoadingOverlay(content='', active=False, text='', spinner_size='md', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''wrapped content (pre-rendered HTML)
activeboolFalsewhether overlay is shown
textstr''loading message text
spinner_sizestr'md'sm, md, lg
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Log Viewer

Monospace streaming log display with level coloring.

python · Data Display · from djust.components import LogViewer · Open it live

LogViewer(lines=None, stream_event='', show_line_numbers=True, auto_scroll=True, filter_level='', wrap=False, max_lines=0, custom_class='', **kwargs)
ParameterTypeDefaultDescription
lineslist | NoneNonelist of log line strings
stream_eventstr''djust event for receiving new log lines
show_line_numbersboolTrueshow line numbers (default True)
auto_scrollboolTrueauto-scroll to bottom on new lines (default True)
filter_levelstr''filter to specific level (info/warn/error/debug)
wrapboolFalsewrap long lines (default False)
max_linesint0maximum lines to display (0 = unlimited)
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs a client hook djust does not ship: dj-hook="LogViewer". The markup renders, but the interaction is yours to add — register window.djust.hooks.LogViewer (see hooks).

M

Map Picker

Click-to-pick location on a Leaflet/OSM map.

python · Media · from djust.components import MapPicker · Open it live

MapPicker(lat=0.0, lng=0.0, pick_event='set_location', zoom=13, height='400px', custom_class='', **kwargs)
ParameterTypeDefaultDescription
latfloat0.0Latitude of the marker.
lngfloat0.0Longitude of the marker.
pick_eventstr'set_location'Event name fired on map click.
zoomint13Map zoom level (default: 13).
heightstr'400px'Map height CSS value.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: set_location. Give the component a name when a page holds more than one; the handler receives it as name.

Needs a client hook djust does not ship: dj-hook="MapPicker". The markup renders, but the interaction is yours to add — register window.djust.hooks.MapPicker (see hooks).

Markdown

Render Markdown text as sanitized HTML.

python · Data Display · from djust.components import Markdown · Open it live

Markdown(text='', custom_class='', extensions=None, **kwargs)
ParameterTypeDefaultDescription
textstr''Markdown source text to render.
custom_classstr''Additional CSS classes to add to the wrapper div.
extensionslist | NoneNoneList of markdown extensions. Defaults to ["fenced_code", "tables", "nl2br"].
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Markdown Editor

Split-pane markdown editor with live preview.

python · Advanced · from djust.components import MarkdownEditor · Open it live

MarkdownEditor(name='content', value='', preview=True, toolbar=True, placeholder='Write markdown...', rows=12, disabled=False, event='', custom_class='', mode='markdown', **kwargs)
ParameterTypeDefaultDescription
namestr'content'form field name
valuestr''initial markdown content
previewboolTrueshow preview pane (default True)
toolbarboolTrueshow formatting toolbar (default True)
placeholderstr'Write markdown...'textarea placeholder text
rowsint12textarea rows
disabledboolFalsedisable editing
eventstr''djust event on change
custom_classstr''additional CSS classes
modestr'markdown'initial editing mode; visual requires the optional visual bundle
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/markdown-editor.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Markdown Textarea

Style-agnostic textarea with markdown preview toggle.

python · Advanced · from djust.components import MarkdownTextarea · Open it live

MarkdownTextarea(name='content', value='', preview=False, toggle_event='toggle_preview', placeholder='Write markdown here...', rows=6, disabled=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'content'Form field name
valuestr''Current textarea content
previewboolFalseWhether preview mode is active (default: False)
toggle_eventstr'toggle_preview'djust event to toggle preview mode
placeholderstr'Write markdown here...'Placeholder text
rowsint6Number of textarea rows (default: 6)
disabledboolFalseWhether the textarea is disabled
custom_classstr''Additional CSS classes
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_preview.

Needs its script: add <script src="{% static 'djust_components/markdown-textarea.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Masonry Grid

Pinterest-style masonry grid layout.

python · Layout · from djust.components import MasonryGrid · Open it live

MasonryGrid(items=None, columns=3, gap=16, custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemslist | NoneNoneList of dicts with content (HTML string), optional height, class
columnsint3Number of columns (default: 3)
gapint16Gap between items in px (default: 16)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Mentions Input

Text input that triggers a user mention dropdown on @ character.

python · Forms · from djust.components import MentionsInput · Open it live

MentionsInput(name='message', users=None, event='send', placeholder='Type @ to mention...', disabled=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'message'Input field name attribute.
usersList[dict] | NoneNoneList of user dicts with id, name, and optional avatar.
eventstr'send'Event name fired on submit (default: "send").
placeholderstr'Type @ to mention...'Placeholder text.
disabledboolFalseWhether the input is disabled.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: send.

Needs a client hook djust does not ship: dj-hook="MentionsInput". The markup renders, but the interaction is yours to add — register window.djust.hooks.MentionsInput (see hooks).

Meter

Style-agnostic meter / stacked progress component.

python · Core UI · from djust.components import Meter · Open it live

Meter(segments=None, total=100, label='', show_legend=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
segmentslist | NoneNoneList of segment dicts with value, color, label
totalint100Total value (default: 100)
labelstr''Overall meter label
show_legendboolTrueShow color legend below bar (default: True)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Modal dialog overlay component.

template · Core UI · Open it live

{% theme_modal id=... title=... size=... css_prefix=... attrs=... slot_header=... %}
ParameterTypeDefaultDescription
idstrrequired
titlestr | NoneNone
sizestrmd
css_prefixstr``
attrsdictNone
slot_headerstrNone
slot_bodystrNone
slot_footerstrNone
slot_closestrNone

Or as a Python component — from djust.components import Modal:

Modal(title='', content='', is_open=False, size='md', close_event='close_modal', custom_class='', **kwargs)

Events sent to your view: toggle_modal.

Slots: slot_header, slot_body, slot_footer, slot_close

Accessibility: Modal must have role=dialog; Modal must have aria-modal=true.

Model Selector

Rich select for AI model selection with metadata display.

python · Advanced · from djust.components import ModelSelector · Open it live

ModelSelector(name='model', options=None, value='', event='select_model', toggle_event='toggle_model_selector', is_open=False, placeholder='Select a model...', disabled=False, label='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'model'Form field name
optionslist | NoneNoneList of model option dicts (value, label, description, context_window, tier)
valuestr''Currently selected model value
eventstr'select_model'djust event fired on selection
toggle_eventstr'toggle_model_selector'djust event fired when the trigger is clicked. The host owns is_open — this component renders it, it does not track it.
is_openboolFalseWhether the option list is showing
placeholderstr'Select a model...'Placeholder text
disabledboolFalseWhether selector is disabled
labelstr''Optional label text
custom_classstr''Additional CSS classes
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_model_selector, select_model.

Multi Select

Multi-select checkbox list component.

python · Forms · from djust.components import MultiSelect · Open it live

MultiSelect(name='', label='', options=None, selected=None, event='', placeholder='Search...', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''form field name
labelstr''label text
optionslist | NoneNonelist of dicts with keys: value, label
selectedlist | NoneNonelist of currently selected values
eventstr''dj-change event name. Each box sends option (its value) and value (whether it is now ticked):: @event_handler() def set_frameworks(self, option, value, **kwargs): picked = [s for s in self.picker.selected if s != option] self.picker.selected = picked + [option] if value else picked
placeholderstr'Search...'
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: set_frameworks.

Multimodal Input

Text area with optional file attachment and voice input buttons.

python · Advanced · from djust.components import MultimodalInput · Open it live

MultimodalInput(name='message', event='send', placeholder='Type a message...', accept_files=False, accept_voice=False, file_accept='*/*', disabled=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'message'Form field name for the text input
eventstr'send'djust event fired on send
placeholderstr'Type a message...'Placeholder text for the textarea
accept_filesboolFalseWhether to show file attachment button
accept_voiceboolFalseWhether to show voice input button
file_acceptstr'*/*'MIME types for file input (default: "/")
disabledboolFalseWhether the input is disabled
custom_classstr''Additional CSS classes
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: send.

N

template · Navigation · Open it live

{% theme_nav brand=... items=... css_prefix=... attrs=... slot_brand=... slot_items=... %}
ParameterTypeDefaultDescription
brandstr | NoneNone
itemslistNone
css_prefixstr``
attrsdictNone
slot_brandstrNone
slot_itemsstrNone
slot_actionsstrNone

Slots: slot_brand, slot_items, slot_actions

Accessibility: Nav must have role=navigation; Nav must have aria-label.

template · Navigation · Open it live

{% theme_nav_group label=... items=... icon=... expanded=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
labelstrrequired
itemslistNone
iconstr | NoneNone
expandedboolTrue
css_prefixstr``
attrsdictNone
slot_labelstrNone
slot_itemsstrNone

Slots: slot_label, slot_items

template · Navigation · Open it live

{% theme_nav_item label=... url=... icon=... active=... badge=... css_prefix=... %}
ParameterTypeDefaultDescription
labelstrrequired
urlstrrequired
iconstr | NoneNone
activebool | NoneNone
badgestr | NoneNone
css_prefixstr``
attrsdictNone
slot_iconstrNone
slot_badgestrNone

Slots: slot_icon, slot_badge

Accessibility: Active nav item must have aria-current=page.

Horizontal navigation menu component.

python · Navigation · from djust.components import NavMenu · Open it live

NavMenu(items=None, brand='', brand_href='/', content='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemslist | NoneNonelist of dicts with keys: label, href, active (bool)
brandstr''brand/logo text
brand_hrefstr'/'brand link URL
contentstr''pre-rendered HTML content (alternative to items)
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Notification Badge

Style-agnostic notification badge using CSS custom properties.

python · Feedback · from djust.components import NotificationBadge · Open it live

NotificationBadge(count=0, max_count=99, dot=False, pulse=False, size='md', custom_class='', **kwargs)
ParameterTypeDefaultDescription
countint0Number to display
max_countint99Maximum count before showing "N+" (default: 99)
dotboolFalseShow as a dot with no text (default: False)
pulseboolFalseAnimate with pulse (default: False)
sizestr'md'Size variant (sm, md, lg)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Notification Center

Notification bell with dropdown list component.

python · Feedback · from djust.components import NotificationCenter · Open it live

NotificationCenter(notifications=None, unread_count=0, open_event='toggle_notifications', mark_read_event='mark_notification_read', clear_event='clear_notifications', custom_class='', is_open=False, **kwargs)
ParameterTypeDefaultDescription
notificationslist | NoneNonelist of dicts with keys: id, message, time, unread
unread_countint0number of unread notifications open_event, mark_read_event, clear_event: dj-click events
open_eventstr'toggle_notifications'
mark_read_eventstr'mark_notification_read'
clear_eventstr'clear_notifications'
custom_classstr''
is_openboolFalsewhether the dropdown is shown; flip it in your open_event handler (self.bell.is_open = not self.bell.is_open)
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_notifications, mark_notification_read, clear_notifications. Give the component a name when a page holds more than one; the handler receives it as name.

Notification Popover

Style-agnostic notification popover using CSS custom properties.

python · Feedback · from djust.components import NotificationPopover · Open it live

NotificationPopover(notifications=None, unread_count=0, mark_read_event='mark_read', toggle_event='toggle_notifications', is_open=False, title='Notifications', custom_class='', **kwargs)
ParameterTypeDefaultDescription
notificationsList[Union[dict, object]] | NoneNoneList of notification dicts with id, title, body, time, read.
unread_countint0Number of unread notifications (shown on badge).
mark_read_eventstr'mark_read'djust event fired when an unread item is clicked.
toggle_eventstr'toggle_notifications'djust event to open/close popover.
is_openboolFalseWhether the popover is open.
titlestr'Notifications'Header text (default "Notifications").
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_notifications, mark_read. Give the component a name when a page holds more than one; the handler receives it as name.

Number Stepper

Numeric +/- stepper input component.

python · Forms · from djust.components import NumberStepper · Open it live

NumberStepper(name='', value=0, min_val=None, max_val=None, step=1, event='', label='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''form field name
valueint0current value
min_valint | NoneNoneminimum value
max_valint | NoneNonemaximum value
stepint1increment amount
eventstr''dj-click event name
labelstr''label text
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

O

Org Chart

Hierarchical org chart / tree visualization.

python · Media · from djust.components import OrgChart · Open it live

OrgChart(nodes=None, root=None, event='', direction='vertical', custom_class='', **kwargs)
ParameterTypeDefaultDescription
nodeslist | NoneNoneList of dicts with id, name, title, optional parent, avatar
rootstr | NoneNoneID of root node (auto-detected if omitted)
eventstr''djust click event for node selection
directionstr'vertical'"vertical" (default) or "horizontal"
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Otp Input

One-time code input component.

python · Forms · from djust.components import OtpInput · Open it live

OtpInput(name='', digits=6, event='', label='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''form field name
digitsint6number of digit boxes
eventstr''dj-change event name
labelstr''label text
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: verify_code.

Needs its script: add <script src="{% static 'djust_components/otp-input.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

P

Page Alert

Style-agnostic full-width page alert / banner component.

python · Feedback · from djust.components import PageAlert · Open it live

PageAlert(message='', type='info', dismissible=False, dismiss_event='dismiss_alert', icon='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
messagestr''Alert message text
typestr'info'Alert type (info, success, warning, error)
dismissibleboolFalseWhether the alert can be dismissed
dismiss_eventstr'dismiss_alert'djust event for dismissing
iconstr''Optional icon/emoji
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: dismiss_alert. Give the component a name when a page holds more than one; the handler receives it as name.

Page-level header with title, subtitle, and optional actions.

python · Layout · from djust.components import PageHeader · Open it live

PageHeader(title='', subtitle='', description='', actions='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
titlestr''page title
subtitlestr''subtitle text
descriptionstr''description text
actionsstr''pre-rendered HTML for action buttons (caller's responsibility)
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Pagination

Pagination controls component.

template · Core UI · Open it live

{% theme_pagination current_page=... total_pages=... url_pattern=... show_edges=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
current_pageintrequired
total_pagesintrequiredtotal number of pages
url_patternstrrequired
show_edgesboolTrue
css_prefixstr``
attrsdictNone
slot_prevstrNone
slot_nextstrNone

Or as a Python component — from djust.components import Pagination:

Pagination(page=1, total_pages=1, prev_event='page_prev', next_event='page_next', custom_class='', **kwargs)

Slots: slot_prev, slot_next

Accessibility: Pagination nav must have aria-label.

Pie Chart

Style-agnostic SVG pie/donut chart using CSS custom properties.

python · Charts · from djust.components import PieChart · Open it live

PieChart(segments=None, title=None, width=300, height=300, donut=False, inner_radius=0.6, show_labels=True, show_legend=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
segmentslist | NoneNoneList of segment dicts with label, value, and optional color
titlestr | NoneNoneOptional chart title
widthint300SVG width (default: 300)
heightint300SVG height (default: 300)
donutboolFalseRender as donut chart (default: False)
inner_radiusfloat0.6Inner radius ratio for donut (0-1, default: 0.6)
show_labelsboolTrueShow percentage labels (default: True)
show_legendboolTrueShow legend below chart (default: True)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Pivot Table

Configurable pivot table that aggregates data by row/column dimensions.

python · Data Display · from djust.components import PivotTable · Open it live

PivotTable(data=None, rows='', cols='', values='', agg='sum', title=None, show_totals=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
datalist | NoneNoneList of dicts (flat records)
rowsstr''Field name for row grouping
colsstr''Field name for column grouping
valuesstr''Field name for the numeric value
aggstr'sum'Aggregation function — "sum", "avg", "count", "min", "max" (default: "sum")
titlestr | NoneNoneOptional table title
show_totalsboolTrueShow row/column totals (default: True)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Popover

Popover overlay component.

python · Core UI · from djust.components import Popover · Open it live

Popover(trigger='Click me', content='', title='', placement='bottom', custom_class='', **kwargs)
ParameterTypeDefaultDescription
triggerstr'Click me'trigger button text
contentstr''popover body (pre-rendered HTML)
titlestr''optional popover title
placementstr'bottom'bottom, top, left, right
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Presence Avatars

Stacked avatar group showing online/present users with status dots.

python · Advanced · from djust.components import PresenceAvatars · Open it live

PresenceAvatars(users=None, max_display=5, custom_class='', **kwargs)
ParameterTypeDefaultDescription
usersList[Union[dict, object]] | NoneNoneList of user dicts (name, avatar, status) or objects. status can be: "online", "away", "busy", "offline" (default: "online").
max_displayint5Maximum avatars before "+N" overflow (default: 5).
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Progress

Style-agnostic progress bar component using CSS custom properties.

template · Core UI · Open it live

{% theme_progress value=... max=... label=... css_prefix=... attrs=... slot_label=... %}
ParameterTypeDefaultDescription
valueint | NoneNoneCurrent progress value
maxint100Maximum value (default: 100)
labelstr``Optional label text displayed above the bar
css_prefixstr``
attrsdictNone
slot_labelstrNone

Or as a Python component — from djust.components import Progress:

Progress(value=0, max=100, label=None, variant='default', size='md', show_value=False, custom_class='', **kwargs)

Slots: slot_label

Accessibility: Progress must have role=progressbar.

Progress Circle

Style-agnostic circular progress indicator using SVG stroke-dasharray.

python · Advanced · from djust.components import ProgressCircle · Open it live

ProgressCircle(value=0, size='md', color='primary', show_value=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
valueint0Progress percentage (0-100)
sizestr'md'Size variant (sm, md, lg)
colorstr'primary'Color variant (primary, success, warning, danger)
show_valueboolTrueWhether to display percentage text (default: True)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Prompt Editor

Template editing with {{variable}} highlighting.

python · Advanced · from djust.components import PromptEditor · Open it live

PromptEditor(template='', variables=None, event='save_prompt', placeholder='Enter your prompt template...', rows=6, custom_class='', **kwargs)
ParameterTypeDefaultDescription
templatestr''The template string with {{variable}} placeholders.
variablesDict[str, str] | NoneNoneDict of variable name -> value for preview.
eventstr'save_prompt'Event name for save action.
placeholderstr'Enter your prompt template...'Placeholder text for the editor.
rowsint6Number of rows for the textarea.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: save_prompt. Give the component a name when a page holds more than one; the handler receives it as name.

Q

Qr Code

Pure SVG QR code generator.

python · Advanced · from djust.components import QRCode · Open it live

QRCode(data='', size='md', fg_color='#000', bg_color='#fff', custom_class='', **kwargs)
ParameterTypeDefaultDescription
datastr''The data to encode in the QR code.
sizestr'md'Size preset (sm=128, md=200, lg=300) or int.
fg_colorstr'#000'Foreground color (default: #000).
bg_colorstr'#fff'Background color (default: #fff).
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

R

Radio

template · Core UI · Open it live

{% theme_radio name=... label=... options=... selected=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
namestrrequired
labelstr | NoneNone
optionslistNone
selectedstr``
css_prefixstr``
attrsdictNone
slot_labelstrNone
slot_optionsstrNone

Slots: slot_label, slot_options

Accessibility: Radio group must have role=radiogroup.

Rating

Star rating component.

python · Core UI · from djust.components import Rating · Open it live

Rating(value=0, max_stars=5, readonly=False, event='set_rating', size='md', custom_class='', **kwargs)
ParameterTypeDefaultDescription
valuefloat0current rating value (0-max_stars, supports half stars)
max_starsint5maximum number of stars
readonlyboolFalseif True, stars are not clickable
eventstr'set_rating'dj-click event name
sizestr'md'sm, md, lg
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: set_rating. Give the component a name when a page holds more than one; the handler receives it as name.

Reactions

Slack-style emoji reactions with live-updating counts.

python · Advanced · from djust.components import Reactions · Open it live

Reactions(options=None, counts=None, event='react', active=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
optionsList[str] | NoneNoneList of emoji strings to display.
countsDict[str, int] | NoneNoneDict mapping emoji to count.
eventstr'react'djust event to fire on click.
activeList[str] | NoneNoneList of emojis the current user has selected.
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: react. Give the component a name when a page holds more than one; the handler receives it as name.

Relative Time

Displays a datetime as relative text ("3 hours ago") with optional

python · Advanced · from djust.components import RelativeTime · Open it live

RelativeTime(datetime=None, auto_update=True, interval=60, custom_class='', **kwargs)
ParameterTypeDefaultDescription
datetimeUnion[str, ForwardRef('datetime'), NoneType]NoneISO-format datetime string or datetime object
auto_updateboolTrueEnable client-side interval updates (default True)
intervalint60Update interval in seconds (default 60)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/relative-time.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Resizable Panel

Container with a drag-to-resize handle.

python · Layout · from djust.components import ResizablePanel · Open it live

ResizablePanel(content='', direction='horizontal', min_size='100px', max_size='none', initial_size='50%', disabled=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''HTML content inside the panel
directionstr'horizontal'"horizontal" or "vertical" (default "horizontal")
min_sizestr'100px'minimum size CSS value (default "100px")
max_sizestr'none'maximum size CSS value (default "none")
initial_sizestr'50%'starting size CSS value (default "50%")
disabledboolFalsedisable resize (default False)
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs a client hook djust does not ship: dj-hook="ResizablePanel". The markup renders, but the interaction is yours to add — register window.djust.hooks.ResizablePanel (see hooks).

Responsive Image

Picture element with srcset, lazy loading, and blur-up placeholder.

python · Media · from djust.components import ResponsiveImage · Open it live

ResponsiveImage(src='', alt='', aspect_ratio='', lazy=True, srcset='', sizes='', placeholder='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
srcstr''Image URL (required)
altstr''Alt text (required for accessibility)
aspect_ratiostr''CSS aspect-ratio value (e.g. "16/9", "4/3", "1/1")
lazyboolTrueEnable native lazy loading (default True)
srcsetstr''Optional srcset attribute value
sizesstr''Optional sizes attribute value
placeholderstr''URL for blur-up placeholder image
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/responsive-image.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Ribbon

Corner ribbon overlay badge.

python · Layout · from djust.components import Ribbon · Open it live

Ribbon(text='', variant='primary', position='top-right', custom_class='', **kwargs)
ParameterTypeDefaultDescription
textstr''Ribbon label text.
variantstr'primary'Color variant (primary, success, warning, danger).
positionstr'top-right'Corner position (top-left, top-right, bottom-left, bottom-right).
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Rich Select

Select dropdown where each option can include icons, images, descriptions,

python · Forms · from djust.components import RichSelect · Open it live

RichSelect(name='', options=None, value='', event='', placeholder='Select...', disabled=False, searchable=False, label='', variant_map=None, **kwargs)
ParameterTypeDefaultDescription
namestr''form field name
optionsList[Dict] | NoneNonelist of dicts with keys: value, label, and optional icon, image, description, badge, variant
valuestr''currently selected value
eventstr''dj-click event name for selection
placeholderstr'Select...'text shown when nothing is selected
disabledboolFalsedisables the control; suppresses trigger variant tint
searchableboolFalseadds search input to filter options
labelstr''optional label text
variant_mapDict[str, str] | NoneNoneoptional dict mapping option value → variant name; applied to any option that doesn't already declare its own variant key
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Rich Text Editor

Basic rich text editor component (contenteditable + toolbar).

python · Advanced · from djust.components import RichTextEditor · Open it live

RichTextEditor(name='content', value='', event='update_content', placeholder='Start typing...', height='200px', label='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'content'form field name
valuestr''initial HTML content (pre-rendered, caller's responsibility)
eventstr'update_content'dj-input event name
placeholderstr'Start typing...'editor placeholder
heightstr'200px'CSS min-height
labelstr''label text
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: update_content.

S

Scroll Area

Scrollable area container component.

python · Layout · from djust.components import ScrollArea · Open it live

ScrollArea(content='', max_height='400px', label='Scrollable content', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''scrollable content (pre-rendered HTML)
max_heightstr'400px'CSS max-height value
labelstr'Scrollable content'accessible label
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Scroll Spy

Style-agnostic scroll spy component.

python · Navigation · from djust.components import ScrollSpy · Open it live

ScrollSpy(sections=None, active='', active_event='section_changed', offset='0px', custom_class='', **kwargs)
ParameterTypeDefaultDescription
sectionslist | NoneNoneList of section IDs to observe
activestr''Currently active section ID
active_eventstr'section_changed'djust event fired when active section changes
offsetstr'0px'Offset from top for intersection (default: "0px")
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: section_changed. Give the component a name when a page holds more than one; the handler receives it as name.

Needs its script: add <script src="{% static 'djust_components/scroll-spy.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Scroll To Top

Floating scroll-to-top button that appears after a scroll threshold.

python · Navigation · from djust.components import ScrollToTop · Open it live

ScrollToTop(threshold='300px', label='Back to top', custom_class='', **kwargs)
ParameterTypeDefaultDescription
thresholdstr'300px'Scroll distance before button appears (default "300px")
labelstr'Back to top'Accessible label (default "Back to top")
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/scroll-to-top.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Segmented Progress

Style-agnostic segmented progress bar with labeled steps.

python · Core UI · from djust.components import SegmentedProgress · Open it live

SegmentedProgress(steps=None, current=0, size='md', event='set_segment', custom_class='', **kwargs)
ParameterTypeDefaultDescription
stepsList[Union[str, Dict]] | NoneNoneList of step labels (strings) or dicts with "label" key
currentint0Current step number (1-indexed)
sizestr'md'Size variant (sm, md, lg)
eventstr'set_segment'djust event dispatched when a step is clicked. Each step sends its 1-based number as value, so a host sets current to it. Pass an empty string to render the steps as static indicators instead.
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: set_segment. Give the component a name when a page holds more than one; the handler receives it as name.

Select

template · Core UI · Open it live

{% theme_select name=... label=... options=... placeholder=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
namestrrequired
labelstr | NoneNone
optionslistNone
placeholderstr``
css_prefixstr``
attrsdictNone
slot_labelstrNone
slot_selectstrNone
slot_help_textstrNone
slot_errorstrNone

Slots: slot_label, slot_select, slot_help_text, slot_error

Accessibility: Label must reference select via for attribute.

Server Event Toast

python · Feedback · Open it live

Server Event Toast()

Sheet

Sheet/drawer overlay component.

python · Layout · from djust.components import Sheet · Open it live

Sheet(content='', title='', side='right', is_open=False, close_event='close_sheet', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''sheet body (pre-rendered HTML)
titlestr''optional header title
sidestr'right'left, right
is_openboolFalsewhether sheet is open
close_eventstr'close_sheet'dj-click event name
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: close_sheet. Give the component a name when a page holds more than one; the handler receives it as name.

Sidebar navigation component.

python · Navigation · from djust.components import Sidebar · Open it live

Sidebar(items=None, title='', collapsed=False, content='', toggle_event='toggle_sidebar', custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemslist | NoneNonelist of dicts with keys: label, href, icon, active (bool)
titlestr''sidebar title
collapsedboolFalsewhether sidebar is collapsed
contentstr''pre-rendered HTML content (alternative to items)
toggle_eventstr'toggle_sidebar'
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_sidebar. Give the component a name when a page holds more than one; the handler receives it as name.

template · Navigation · Open it live

{% theme_sidebar_nav sections=... css_prefix=... attrs=... slot_header=... slot_sections=... slot_footer=... %}
ParameterTypeDefaultDescription
sectionslistNone
css_prefixstr``
attrsdictNone
slot_headerstrNone
slot_sectionsstrNone
slot_footerstrNone

Slots: slot_header, slot_sections, slot_footer

Accessibility: Sidebar nav must have role=navigation; Sidebar nav must have aria-label=Sidebar.

Signature Pad

Canvas-based signature capture pad.

python · Forms · from djust.components import SignaturePad · Open it live

SignaturePad(name='signature', save_event='save_signature', width=400, height=200, pen_color='#000000', pen_width=2, disabled=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'signature'form field name for the hidden input
save_eventstr'save_signature'djust event fired on save with base64 data
widthint400canvas width (default 400)
heightint200canvas height (default 200)
pen_colorstr'#000000'stroke color (default "#000000")
pen_widthint2stroke width in px (default 2)
disabledboolFalsedisable drawing (default False)
custom_classstr''additional CSS classes
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: save_signature.

Needs a client hook djust does not ship: dj-hook="SignaturePad". The markup renders, but the interaction is yours to add — register window.djust.hooks.SignaturePad (see hooks).

Skeleton

Skeleton loading placeholder component.

template · Core UI · Open it live

{% theme_skeleton variant=... width=... height=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
variantstrtext
widthstr100%
heightstr1rem
css_prefixstr``
attrsdictNone

Or as a Python component — from djust.components import Skeleton:

Skeleton(skeleton_type='text', lines=3, custom_class='', **kwargs)

Skeleton Factory

Style-agnostic skeleton loading state generator.

python · Advanced · from djust.components import SkeletonFactory · Open it live

SkeletonFactory(component='text', columns=4, rows=5, custom_class='', **kwargs)
ParameterTypeDefaultDescription
componentstr'text'Target component type (data_table, card, list, text)
columnsint4Number of columns (for data_table, default: 4)
rowsint5Number of rows (for data_table/list/text, default: 5)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Sortable Grid

2D drag-and-drop grid layout.

python · Advanced · from djust.components import SortableGrid · Open it live

SortableGrid(items=None, columns=3, move_event='reorder', gap='0.75rem', disabled=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemslist | NoneNonelist of dicts with id, label, optional thumbnail
columnsint3number of grid columns (default 3)
move_eventstr'reorder'djust event fired on reorder
gapstr'0.75rem'CSS gap value (default "0.75rem")
disabledboolFalsedisable drag (default False)
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: reorder. Give the component a name when a page holds more than one; the handler receives it as name.

Needs a client hook djust does not ship: dj-hook="SortableGrid". The markup renders, but the interaction is yours to add — register window.djust.hooks.SortableGrid (see hooks).

Sortable List

Drag-and-drop reorderable list.

python · Advanced · from djust.components import SortableList · Open it live

SortableList(items=None, move_event='reorder', handle=True, disabled=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemslist | NoneNonelist of dicts with id and label keys
move_eventstr'reorder'djust event fired on reorder (receives order list)
handleboolTrueshow drag handle (default True)
disabledboolFalsedisable drag (default False)
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: reorder. Give the component a name when a page holds more than one; the handler receives it as name.

Needs a client hook djust does not ship: dj-hook="SortableList". The markup renders, but the interaction is yours to add — register window.djust.hooks.SortableList (see hooks).

Source Citation

Inline footnote marker with hover popover showing source details.

python · Data Display · from djust.components import SourceCitation · Open it live

SourceCitation(index=1, title='', url='', relevance=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
indexint1Citation number (displayed as superscript)
titlestr''Source title
urlstr''Source URL (optional)
relevancefloat | NoneNoneRelevance score 0-1 (optional)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Sparkline

Style-agnostic inline sparkline using SVG.

python · Charts · from djust.components import Sparkline · Open it live

Sparkline(data=None, variant='line', width=100, height=24, color='', stroke_width=1.5, custom_class='', **kwargs)
ParameterTypeDefaultDescription
datalist | NoneNoneList of numeric values
variantstr'line'Chart type — "line" (default), "bar", "area"
widthint100SVG width (default: 100)
heightint24SVG height (default: 24)
colorstr''Stroke/fill color
stroke_widthfloat1.5Line stroke width (default: 1.5)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Spinner

Style-agnostic spinner component using CSS custom properties.

python · Core UI · from djust.components import Spinner · Open it live

Spinner(size='md', variant='default', label='Loading...', custom_class='', **kwargs)
ParameterTypeDefaultDescription
sizestr'md'Size variant (sm, md, lg)
variantstr'default'Color variant (default, primary, muted)
labelstr | None'Loading...'Screen-reader accessible label (default: "Loading...")
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Split Button

Split button with primary action and dropdown menu.

python · Advanced · from djust.components import SplitButton · Open it live

SplitButton(label='', event='', options=None, variant='primary', size='md', is_open=False, toggle_event='toggle_split_menu', custom_class='', **kwargs)
ParameterTypeDefaultDescription
labelstr''primary button text
eventstr''dj-click event for primary action
optionslist | NoneNonelist of dicts with keys: label, event
variantstr'primary'primary, secondary, danger, success
sizestr'md'sm, md, lg
is_openboolFalse
toggle_eventstr'toggle_split_menu'
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_split_menu. Give the component a name when a page holds more than one; the handler receives it as name.

Split Pane

Split pane/resizable layout component.

python · Layout · from djust.components import SplitPane · Open it live

SplitPane(left='', right='', direction='horizontal', initial=50, custom_class='', **kwargs)
ParameterTypeDefaultDescription
leftstr''left/top pane content (pre-rendered HTML)
rightstr''right/bottom pane content (pre-rendered HTML)
directionstr'horizontal'horizontal, vertical
initialint50initial split percentage
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Stat Card

Style-agnostic stat card component using CSS custom properties.

python · Charts · from djust.components import StatCard · Open it live

StatCard(label, value, trend=None, trend_value=None, icon=None, variant='default', custom_class='', **kwargs)
ParameterTypeDefaultDescription
labelstrrequiredMetric label text
valuestrrequiredMetric value (string for flexible formatting)
trendstr | NoneNoneTrend direction (up, down, flat, or None)
trend_valuestr | NoneNoneTrend change text (e.g., "+12%", "-3%")
iconstr | NoneNoneOptional icon text (emoji or HTML)
variantstr'default'Style variant (default, bordered, elevated)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Status Dot

Style-agnostic animated status indicator dot using CSS custom properties.

python · Feedback · from djust.components import StatusDot · Open it live

StatusDot(status, variant=None, size='md', animate=NOT_SUPPLIED, tooltip=None, custom_class='', custom_status_map=None, custom_animation_map=None, **kwargs)
ParameterTypeDefaultDescription
statusstrrequiredStatus string (e.g., "running", "completed", "failed")
variantstr | NoneNoneColor variant (success, info, warning, danger, muted)
sizestr'md'Size variant (sm, md, lg)
animatestr | NoneNOT_SUPPLIEDAnimation type (pulse, spin, fade, None)
tooltipstr | NoneNoneOptional tooltip text (requires title attribute support)
custom_classstr''Additional CSS classes
custom_status_mapDict[str, str] | NoneNone
custom_animation_mapDict[str, Optional[str]] | NoneNone
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Status Indicator

Style-agnostic status indicator with colored dot and optional label.

python · Feedback · from djust.components import StatusIndicator · Open it live

StatusIndicator(status='offline', label=None, pulse=False, size='md', custom_class='', **kwargs)
ParameterTypeDefaultDescription
statusstr'offline'Status string (online, degraded, offline, maintenance)
labelstr | NoneNoneOptional label text
pulseboolFalseWhether to animate with pulse (default: False)
sizestr'md'Size variant (sm, md, lg)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Stepper

Step indicator/wizard progress component.

python · Navigation · from djust.components import Stepper · Open it live

Stepper(steps=None, active=0, event='set_step', custom_class='', **kwargs)
ParameterTypeDefaultDescription
stepslist | NoneNonelist of dicts with keys: label, complete (bool)
activeint00-based index of current step
eventstr'set_step'dj-click event name for step navigation
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: set_step. Give the component a name when a page holds more than one; the handler receives it as name.

Sticky header component.

python · Navigation · from djust.components import StickyHeader · Open it live

StickyHeader(content='', offset='0', z_index='10', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''header content (pre-rendered HTML)
offsetstr'0'CSS top offset
z_indexstr'10'CSS z-index value
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Streaming Text

Renders text arriving incrementally via WebSocket with typing cursor.

python · Advanced · from djust.components import StreamingText · Open it live

StreamingText(stream_event='stream_chunk', text='', markdown=False, auto_scroll=True, cursor=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
stream_eventstr'stream_chunk'WebSocket event name for incoming text chunks
textstr''Initial text content
markdownboolFalseWhether to render text as markdown
auto_scrollboolTrueWhether to auto-scroll to bottom on new content
cursorboolTrueWhether to show a typing cursor animation
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/streaming-text.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Switch

Style-agnostic toggle switch component using CSS custom properties.

python · Core UI · from djust.components import Switch · Open it live

Switch(name='', checked=False, label=None, disabled=False, action=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''Form field name
checkedboolFalseInitial checked state
labelstr | NoneNoneLabel text displayed next to the switch
disabledboolFalseWhether the switch is disabled
actionstr | NoneNonedjust event handler name (for dj-change)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_switch.

T

Table

template · Data Display · Open it live

{% theme_table headers=... rows=... variant=... caption=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
headerslistrequired
rowslistrequired
variantstrdefault
captionstr | NoneNone
css_prefixstr``
attrsdictNone
slot_captionstrNone
slot_headerstrNone
slot_bodystrNone
slot_footerstrNone

Slots: slot_caption, slot_header, slot_body, slot_footer

Table Of Contents

Table of contents navigation component.

python · Navigation · from djust.components import TableOfContents · Open it live

TableOfContents(items=None, title='Contents', active='', event='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemslist | NoneNonelist of dicts with keys: id, label, level
titlestr'Contents'TOC heading
activestr''currently active section id
eventstr''dj-click event name
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Tabs

Tab navigation component.

template · Core UI · Open it live

{% theme_tabs id=... tabs=... active=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
idstrrequired
tabslistrequiredlist of dicts with keys: id, label
activeint0id of active tab
css_prefixstr``
attrsdictNone

Or as a Python component — from djust.components import Tabs:

Tabs(tabs=None, active='', content='', event='set_tab', custom_class='', **kwargs)

Events sent to your view: set_tab.

Accessibility: Tab list must have role=tablist.

Tag

Style-agnostic tag/chip component using CSS custom properties.

python · Core UI · from djust.components import Tag · Open it live

Tag(label, variant='default', size='md', dismissible=False, action=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
labelstrrequiredTag text content
variantstr'default'Color variant (default, primary, success, info, warning, danger)
sizestr'md'Size variant (sm, md, lg)
dismissibleboolFalseWhether the tag can be dismissed
actionstr | NoneNonedjust event handler name for dismiss (for dj-click)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Tag Input

Tag input component for adding/removing tags.

python · Forms · from djust.components import TagInput · Open it live

TagInput(name='', tags=None, event='', placeholder='Add tag...', label='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''form field name
tagslist | NoneNonelist of current tag strings
eventstr''dj-click event name
placeholderstr'Add tag...'input placeholder
labelstr''label text
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: add_tag.

Terminal

Monospace terminal emulator display with ANSI color support.

python · Data Display · from djust.components import Terminal · Open it live

Terminal(output=None, title='', stream_event='', show_line_numbers=False, wrap=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
outputlist | NoneNonelist of text lines to display
titlestr''optional title bar text
stream_eventstr''djust event for streaming new lines
show_line_numbersboolFalseshow line numbers (default False)
wrapboolFalsewrap long lines (default False)
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs a client hook djust does not ship: dj-hook="Terminal". The markup renders, but the interaction is yours to add — register window.djust.hooks.Terminal (see hooks).

Textarea

template · Core UI · Open it live

{% theme_textarea name=... label=... placeholder=... rows=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
namestrrequired
labelstr | NoneNone
placeholderstr``
rowsint4
css_prefixstr``
attrsdictNone
slot_labelstrNone
slot_textareastrNone
slot_help_textstrNone
slot_errorstrNone

Slots: slot_label, slot_textarea, slot_help_text, slot_error

Accessibility: Label must reference textarea via for attribute.

Theme Toggle

Light/dark/system theme toggle component.

python · Advanced · from djust.components import ThemeToggle · Open it live

ThemeToggle(current='system', event='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
currentstr'system'current theme (light, dark, system)
eventstr''dj-click event name
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs its script: add <script src="{% static 'djust_components/theme-toggle.js' %}"></script> to the page. djust ships it; without it the markup renders but does not update.

Thinking Indicator

Animated status indicator for AI processing states.

python · Advanced · from djust.components import ThinkingIndicator · Open it live

ThinkingIndicator(status='thinking', label='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
statusstr'thinking'Animation type (thinking, searching, generating, tool_use, idle)
labelstr''Descriptive text displayed alongside animation
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Time Picker

Style-agnostic time picker component using CSS custom properties.

python · Forms · from djust.components import TimePicker · Open it live

TimePicker(name='time', value='', event='', format_24h=False, min_time='', max_time='', step=1, disabled=False, label='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr'time'Form field name
valuestr''Initial time value in HH:MM format
eventstr''djust event handler name (for dj-change)
format_24hboolFalseUse 24-hour format (default: False)
min_timestr''Minimum selectable time (HH:MM)
max_timestr''Maximum selectable time (HH:MM)
stepint1Minute step interval (default: 1)
disabledboolFalseWhether the picker is disabled
labelstr''Optional label text
custom_classstr''Additional CSS classes
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Timeline

Timeline component.

python · Data Display · from djust.components import Timeline · Open it live

Timeline(items=None, content='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemslist | NoneNonelist of dicts with keys: title, time, content
contentstr''pre-rendered HTML (alternative to items list)
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Toast

Style-agnostic toast notification component using CSS custom properties.

template · Core UI · Open it live

{% theme_toast message=... variant=... position=... duration=... css_prefix=... attrs=... %}
ParameterTypeDefaultDescription
messagestrrequiredToast text content
variantstrinfo
positionstrtop-right
durationint5000Auto-dismiss duration in ms (0 = no auto-dismiss)
css_prefixstr``
attrsdictNone
slot_messagestrNone
slot_actionsstrNone

Or as a Python component — from djust.components import Toast:

Toast(message, type='info', duration=3000, dismissible=True, action=None, custom_class='', **kwargs)

Slots: slot_message, slot_actions

Accessibility: Toast must have role=status; Toast must have aria-live=polite.

Toggle Group

Segmented toggle button group component.

python · Core UI · from djust.components import ToggleGroup · Open it live

ToggleGroup(name='', options=None, value='', event='toggle_select', size='md', custom_class='', **kwargs)
ParameterTypeDefaultDescription
namestr''group name
optionslist | NoneNonelist of dicts with keys: value, label
valuestr''currently selected value
eventstr'toggle_select'dj-click event name
sizestr'md'sm, md, lg
custom_classstr''
**kwargsPassed to Component: id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_select.

Token Counter

Compact progress display showing token usage versus limit.

python · Advanced · from djust.components import TokenCounter · Open it live

TokenCounter(current=0, max=4096, label=None, show_label=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
currentint0Current token count
maxint4096Maximum token limit
labelstr | NoneNoneOptional label (default: auto-generated "1,500 / 4,096")
show_labelboolTrueWhether to display the label (default: True)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Toolbar

Toolbar component with button groups.

python · Navigation · from djust.components import Toolbar · Open it live

Toolbar(content='', variant='default', align='left', custom_class='', **kwargs)
ParameterTypeDefaultDescription
contentstr''toolbar buttons/controls (pre-rendered HTML)
variantstr'default'default, compact
alignstr'left'left, center, right
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Tooltip

Tooltip component.

template · Core UI · Open it live

{% theme_tooltip text=... position=... css_prefix=... attrs=... slot_content=... %}
ParameterTypeDefaultDescription
textstrrequiredtooltip text
positionstrtoptop, bottom, left, right
css_prefixstr``
attrsdictNone
slot_contentstrNone

Or as a Python component — from djust.components import Tooltip:

Tooltip(text='', content='', position='top', custom_class='', **kwargs)

Slots: slot_content

Tour

Product tour with spotlight highlights and step navigation.

python · Advanced · from djust.components import Tour · Open it live

Tour(steps=None, active=0, event='tour', show_progress=True, show_skip=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
stepslist | NoneNonelist of step dicts with target, title, content
activeint0index of current step (default 0)
eventstr'tour'djust event prefix for navigation (fires event_next, event_prev, event_skip)
show_progressboolTrueshow step progress indicator (default True)
show_skipboolTrueshow skip button (default True)
custom_classstr''additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Needs a client hook djust does not ship: dj-hook="Tour". The markup renders, but the interaction is yours to add — register window.djust.hooks.Tour (see hooks).

Tree View

Expandable tree view component.

python · Data Display · from djust.components import TreeView · Open it live

TreeView(nodes=None, expand_event='tree_expand', select_event='tree_select', selected='', custom_class='', **kwargs)
ParameterTypeDefaultDescription
nodeslist | NoneNonelist of dicts with keys: id, label, expanded (bool), children (list)
expand_eventstr'tree_expand'dj-click event for expanding nodes
select_eventstr'tree_select'dj-click event for selecting nodes
selectedstr''currently selected node id
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: tree_expand, tree_select. Give the component a name when a page holds more than one; the handler receives it as name.

Treemap

Style-agnostic SVG treemap using CSS custom properties.

python · Charts · from djust.components import Treemap · Open it live

Treemap(data=None, value_key='size', label_key='name', title=None, width=400, height=250, colors=None, custom_class='', **kwargs)
ParameterTypeDefaultDescription
datalist | NoneNoneList of dicts with label_key and value_key fields
value_keystr'size'Key for numeric value (default: "size")
label_keystr'name'Key for label text (default: "name")
titlestr | NoneNoneOptional chart title
widthint400SVG width (default: 400)
heightint250SVG height (default: 250)
colorslist | NoneNoneList of fill colors (cycles)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Truncated List

Style-agnostic truncated list component.

python · Data Display · from djust.components import TruncatedList · Open it live

TruncatedList(items=None, max=3, expanded=False, toggle_event='toggle_list', overflow_label='+{count} more', custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemsList | NoneNoneList of items (strings or dicts with 'label' key)
maxint3Maximum items to show before overflow (default: 3)
expandedboolFalseWhether list is currently expanded (default: False)
toggle_eventstr'toggle_list'djust event to toggle expanded state
overflow_labelstr'+{count} more'Custom overflow label; {count} is replaced with hidden count
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: toggle_list. Give the component a name when a page holds more than one; the handler receives it as name.

V

Virtual List

Paginated virtual list component.

python · Data Display · from djust.components import VirtualList · Open it live

VirtualList(items=None, total=0, page=1, page_size=20, load_more_event='load_more', custom_class='', **kwargs)
ParameterTypeDefaultDescription
itemslist | NoneNonelist of dicts or strings
totalint0total number of items
pageint1current page number
page_sizeint20items per page
load_more_eventstr'load_more'dj-click event for loading more
custom_classstr''
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: load_more. Give the component a name when a page holds more than one; the handler receives it as name.

Voice Input

Mic button with recording animation for speech input.

python · Advanced · from djust.components import VoiceInput · Open it live

VoiceInput(event='transcribe', lang='en-US', continuous=False, custom_class='', **kwargs)
ParameterTypeDefaultDescription
eventstr'transcribe'Event name for transcription result.
langstr'en-US'BCP 47 language tag (default: en-US).
continuousboolFalseWhether to continue recording (default: False).
custom_classstr''Additional CSS classes.
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: transcribe. Give the component a name when a page holds more than one; the handler receives it as name.

Needs a client hook djust does not ship: dj-hook="VoiceInput". The markup renders, but the interaction is yours to add — register window.djust.hooks.VoiceInput (see hooks).

W

Wizard

Style-agnostic multi-step form wizard using CSS custom properties.

python · Navigation · from djust.components import Wizard · Open it live

Wizard(steps=None, active='', event='set_step', show_numbers=True, custom_class='', **kwargs)
ParameterTypeDefaultDescription
stepslist | NoneNoneList of step dicts with id and label keys
activestr''ID of the currently active step
eventstr'set_step'djust event for step navigation
show_numbersboolTrueShow step numbers (default: True)
custom_classstr''Additional CSS classes
**kwargsPassed to Component: name= identifies this instance in the events it sends, id= sets component.id (it is not written into the markup); any other keyword is kept as state.

Events sent to your view: set_step. Give the component a name when a page holds more than one; the handler receives it as name.