Skip to content
GitHub

Public API Reference

Every symbol exported from lexigram.ui, grouped by category.

Stability tiers:

  • ✓ stable — safe for production use
  • 🔬 experimental — may change, feedback welcome
  • ⚠️ deprecated — use replacement instead

SymbolDescriptionModuleStability
ComponentBase class for all UI componentslexigram.ui.core.base✓ stable
ElementLightweight HTML element compatible with htpylexigram.ui.core.base✓ stable
RawHTMLWrapper for verbatim HTML stringslexigram.ui.core.base✓ stable
elElement factory function (pythonic kwargs)lexigram.ui.core.base✓ stable
rawShorthand for RawHTML(...)lexigram.ui.core.base✓ stable
render_to_stringConvert any renderable to HTML stringlexigram.ui.core.base✓ stable
SymbolDescriptionModuleStability
as_childParameter on Component.__init__() enabling slot-based delegationlexigram.ui.core.base🔬 experimental

Note: Slot is used internally by the asChild pattern. All Component subclasses accept as_child as a constructor parameter. Components supporting asChild: Button, Link, Card, and any custom Component subclass.


SymbolDescriptionModuleStability
UIContextImmutable request-scoped UI context dataclasslexigram.ui.core.context✓ stable
get_ui_contextRetrieve the current ContextVar-bound contextlexigram.ui.core.context✓ stable
reset_ui_contextReplace context with a fresh defaultlexigram.ui.core.context✓ stable
set_ui_contextBind a context to the current execution scopelexigram.ui.core.context✓ stable

SymbolDescriptionModuleStability
ZoneNamed HTMX swap target (id + swap mode)lexigram.ui.core.zones✓ stable
ZonesCanonical registry of all swap zoneslexigram.ui.core.zones✓ stable
SwapModeEnum of HTMX swap modeslexigram.ui.core.zones✓ stable

SymbolDescriptionModuleStability
get_iconResolve icon definition by namelexigram.ui.atoms.icons🔬 experimental
IconDefinitionIcon metadata (name, svg, category)lexigram.ui.atoms.icons🔬 experimental
IconLibraryRegistry of named icon collectionslexigram.ui.atoms.icons🔬 experimental

SymbolDescriptionModuleStability
htmxHTMX attribute generatorslexigram.ui.htmx✓ stable
helpersHTMX helper utilitieslexigram.ui.htmx✓ stable
sseServer-Sent Events helperslexigram.ui.htmx🔬 experimental

SymbolDescriptionModuleStability
UIErrorBase exception for all UI-domain errorslexigram.ui.exceptions✓ stable
ErrorCategoryEnum of error categories (validation, not_found, etc.)lexigram.ui.exceptions✓ stable
FieldErrorError for a specific form fieldlexigram.ui.exceptions✓ stable
ErrorResponseStandardized error response for HTMXlexigram.ui.exceptions✓ stable
validation_errorFactory: 422 validation errorlexigram.ui.exceptions✓ stable
not_found_errorFactory: 404 not found errorlexigram.ui.exceptions✓ stable
permission_errorFactory: 403 permission errorlexigram.ui.exceptions✓ stable
server_errorFactory: 500 server error (optional retry)lexigram.ui.exceptions✓ stable
timeout_errorFactory: 504 timeout errorlexigram.ui.exceptions✓ stable
render_validation_errorsRender field errors to HTMLlexigram.ui.exceptions✓ stable
htmx_error_responseBuild complete HTMX error response tuplelexigram.ui.exceptions✓ stable

SymbolDescriptionModuleStability
UIModuleIoC module descriptorlexigram.ui.module✓ stable
UIProviderProvider that registers UI serviceslexigram.ui.di.provider✓ stable

SymbolDescriptionModuleStability
RenderableProtocolProtocol for objects with render() methodlexigram.ui.protocols✓ stable

SymbolDescriptionModuleStability
SHADCN_DEFAULT_COLORSLight-mode CSS custom property definitions (oklch)lexigram.ui.styles.design_tokens✓ stable
SHADCN_DARK_COLORSDark-mode CSS custom property definitions (oklch)lexigram.ui.styles.design_tokens✓ stable
render_css_variablesGenerate :root / .dark CSS blocks from color mapslexigram.ui.styles.design_tokens✓ stable
render_utility_classesGenerate .bg-*, .text-*, .border-* utility classeslexigram.ui.styles.design_tokens✓ stable
SEMANTIC_UTILITY_CLASSESMap of CSS variable utility class definitionslexigram.ui.styles.design_tokens✓ stable
shadcn_cssGenerate complete ShadCN-compatible CSS with overrideslexigram.ui.styles.theme✓ stable
get_semantic_classesResolve variant name to CSS variable classeslexigram.ui.styles.tokens✓ stable
get_button_classesResolve button color to CSS variable classeslexigram.ui.styles.tokens✓ stable
get_alert_classesResolve alert variant to CSS variable classeslexigram.ui.styles.tokens✓ stable
get_toast_classesResolve toast type to CSS variable classeslexigram.ui.styles.tokens✓ stable
get_semantic_iconResolve variant to icon namelexigram.ui.styles.tokens✓ stable
BUTTON_CLASSESMap of button color names to CSS classeslexigram.ui.styles.tokens✓ stable
ALERT_CLASSESMap of alert variant names to CSS classeslexigram.ui.styles.tokens✓ stable
TOAST_CLASSESMap of toast type names to CSS classeslexigram.ui.styles.tokens✓ stable
SEMANTIC_CLASSESMap of variant names to CSS variable classeslexigram.ui.styles.tokens✓ stable
SEMANTIC_ICONSMap of variant names to icon nameslexigram.ui.styles.tokens✓ stable

SymbolDescriptionModuleStability
UIThemeEnum: DEFAULT, DARK, LIGHT, SYSTEMlexigram.ui.constants✓ stable
BreakpointEnum: responsive breakpoints (SM–XXL)lexigram.ui.constants✓ stable
UI_CSP_REQUIREMENTSCSP directives for external CDN assetslexigram.ui.constants✓ stable
__version__Package versionlexigram.ui.constants✓ stable

SymbolDescriptionModuleStability
componentMetadata decorator (__component_name__)lexigram.ui.decorators✓ stable

SymbolDescriptionModuleStability
UIComponentRenderedHookPayload fired after component renderlexigram.ui.hooks🔬 experimental
UITemplateRenderedHookPayload fired after template renderlexigram.ui.hooks🔬 experimental

SymbolDescriptionModuleStability
AriaAttrsBuilder for ARIA attribute dictslexigram.ui.accessibility✓ stable
AriaLiveEnum for aria-live values (polite/assertive/off)lexigram.ui.accessibility✓ stable
AriaRoleEnum for common ARIA roleslexigram.ui.accessibility✓ stable
SkipLinkVisually-hidden skip-to-content linklexigram.ui.accessibility✓ stable
announceSend polite/assertive live region announcementlexigram.ui.accessibility✓ stable
announce_table_updateAnnounce dynamic table changeslexigram.ui.accessibility✓ stable
button_ariaGenerate ARIA attrs for buttonslexigram.ui.accessibility✓ stable
dialog_ariaGenerate ARIA attrs for dialogslexigram.ui.accessibility✓ stable
header_ariaGenerate ARIA attrs for headerslexigram.ui.accessibility✓ stable
keyboard_navigation_scriptScript for arrow-key navigationlexigram.ui.accessibility✓ stable
row_ariaGenerate ARIA attrs for table rowslexigram.ui.accessibility✓ stable
search_ariaGenerate ARIA attrs for search regionslexigram.ui.accessibility✓ stable
table_ariaGenerate ARIA attrs for tableslexigram.ui.accessibility✓ stable

SymbolDescriptionModuleStability
UIConfigRoot configuration for the UI providerlexigram.ui.config✓ stable
DebounceConfigHTMX debounce trigger configurationlexigram.ui.config✓ stable
HTMLDocumentConfigHTML document shell generation configlexigram.ui.config✓ stable
BaseLayoutConfigLayout configuration (extends HTMLDocumentConfig)lexigram.ui.config✓ stable
HeadConfigHead section renderer configlexigram.ui.config✓ stable
FooterConfigFooter renderer configlexigram.ui.config✓ stable
ToastConfigToast container behavior configlexigram.ui.config✓ stable

SymbolDescriptionModuleStability
ButtonStyled button componentlexigram.ui.atoms.button✓ stable
SubmitButtonSubmit button with Alpine loading statelexigram.ui.atoms.button✓ stable
BadgeStatus/count badgelexigram.ui.atoms.badge✓ stable
SpinnerLoading spinner (SVG)lexigram.ui.atoms.spinner✓ stable
IconSVG icon rendererlexigram.ui.atoms.icon✓ stable
DividerHorizontal/vertical dividerlexigram.ui.atoms.divider✓ stable
LinkAnchor link componentlexigram.ui.atoms.link✓ stable
LabelForm field labellexigram.ui.atoms.label✓ stable
FieldsetForm field grouplexigram.ui.atoms.fieldset✓ stable
FileUploadBasic file upload inputlexigram.ui.atoms.file_upload✓ stable
ProgressBarProgress indicator barlexigram.ui.atoms.progress_bar✓ stable
SkeletonLoading skeleton placeholderlexigram.ui.atoms.skeleton✓ stable
SwitchToggle switchlexigram.ui.atoms.switch✓ stable
TooltipHover tooltiplexigram.ui.atoms.tooltip✓ stable
MarkdownEditorMarkdown text editorlexigram.ui.atoms.editors🔬 experimental
RichEditorRich text (WYSIWYG) editorlexigram.ui.atoms.editors🔬 experimental

SymbolDescriptionModuleStability
AsideSidebar elementlexigram.ui.atoms.layout✓ stable
ColFlex columnlexigram.ui.atoms.layout✓ stable
ContainerCentered page containerlexigram.ui.atoms.layout✓ stable
GridCSS Grid layoutlexigram.ui.atoms.layout✓ stable
RowGrid row (flex row)lexigram.ui.atoms.layout✓ stable
StackVertical stacklexigram.ui.molecules.stack✓ stable

SymbolDescriptionModuleStability
AbstractInputBase class for all input typeslexigram.ui.atoms.inputs✓ stable
InputGeneric text inputlexigram.ui.atoms.inputs✓ stable
TextInputText inputlexigram.ui.atoms.inputs✓ stable
PasswordInputPassword inputlexigram.ui.atoms.inputs✓ stable
EmailInputEmail inputlexigram.ui.atoms.inputs✓ stable
TextAreaMulti-line text arealexigram.ui.atoms.inputs✓ stable
NumberInputNumeric inputlexigram.ui.atoms.inputs✓ stable
SliderRange sliderlexigram.ui.atoms.inputs✓ stable
DateInputDate pickerlexigram.ui.atoms.inputs🔬 experimental
TimePickerTime pickerlexigram.ui.atoms.inputs🔬 experimental
SelectSingle select dropdownlexigram.ui.atoms.inputs✓ stable
MultiSelectMulti-select dropdownlexigram.ui.atoms.inputs✓ stable
NativeMultiSelectNative HTML multi-selectlexigram.ui.atoms.inputs✓ stable
LazySelectLazily-loaded select (HTMX)lexigram.ui.atoms.inputs🔬 experimental
CheckboxListList of checkboxeslexigram.ui.atoms.inputs✓ stable
RadioRadio button grouplexigram.ui.atoms.inputs✓ stable
BelongsToBelongsTo relationship selectorlexigram.ui.atoms.inputs🔬 experimental
MorphToPolymorphic relationship selectorlexigram.ui.atoms.inputs🔬 experimental
CheckboxSingle checkboxlexigram.ui.atoms.inputs✓ stable
ToggleToggle inputlexigram.ui.atoms.inputs✓ stable
ColorPickerColor picker inputlexigram.ui.atoms.inputs🔬 experimental
HiddenHidden inputlexigram.ui.atoms.inputs✓ stable
KeyValueFieldKey-value pair inputlexigram.ui.atoms.inputs🔬 experimental
RatingStar rating inputlexigram.ui.atoms.inputs🔬 experimental
TagsInputTags/token inputlexigram.ui.atoms.inputs🔬 experimental
AvatarUploadAvatar upload with previewlexigram.ui.atoms.inputs🔬 experimental
MultiFileUploadMulti-file uploadlexigram.ui.atoms.inputs🔬 experimental

SymbolDescriptionModuleStability
ActionButtonButton with action/loading statelexigram.ui.molecules.action_button🔬 experimental
AlertAlert/notification bannerlexigram.ui.molecules.alert✓ stable
SimpleAlertMinimal alert variantlexigram.ui.molecules.simple_alert✓ stable
BreadcrumbsBreadcrumb navigationlexigram.ui.molecules.breadcrumbs✓ stable
CardContent card containerlexigram.ui.molecules.card✓ stable
DropdownDropdown menulexigram.ui.molecules.dropdown✓ stable
EmptyStateEmpty state placeholderlexigram.ui.molecules.empty_state✓ stable
ErrorStateError state displaylexigram.ui.molecules.error_state✓ stable
FormFieldForm field with label, input, and errorlexigram.ui.molecules.form_field✓ stable
FieldSchemaSchema-based form field definitionlexigram.ui.molecules.form_field🔬 experimental
FormActionsForm action buttons barlexigram.ui.molecules.form_actions✓ stable
InputGroupLabel + input + errors compositelexigram.ui.molecules.input_group✓ stable
LoadingOverlayFull-area loading overlaylexigram.ui.molecules.loading_overlay✓ stable
MetricCardSingle metric display cardlexigram.ui.molecules.metric_card✓ stable
ModalModal dialoglexigram.ui.molecules.modal✓ stable
PopoverPopover/tooltip containerlexigram.ui.molecules.popover✓ stable
RichSelectEnhanced select with searchlexigram.ui.molecules.rich_select🔬 experimental
SectionPage section wrapperlexigram.ui.molecules.section✓ stable
StatCardStatistics cardlexigram.ui.molecules.stat_card✓ stable
TabsTabbed containerlexigram.ui.molecules.tabs✓ stable
TabPanelIndividual tab panellexigram.ui.molecules.tabs✓ stable

SymbolDescriptionModuleStability
InlineToastComponent-rendered toastlexigram.ui.molecules.toast✓ stable
ServerToastChannelServer-pushed toast channellexigram.ui.molecules.toast✓ stable
ToastDeprecated alias for InlineToastlexigram.ui.molecules.toast⚠️ deprecated
ToastDataToast data containerlexigram.ui.molecules.toast✓ stable
ToastRendererDeprecated alias for ServerToastChannellexigram.ui.molecules.toast⚠️ deprecated
ToastTypeEnum of toast variantslexigram.ui.molecules.toast✓ stable
flash_to_toastConvert flash message to toastlexigram.ui.molecules.toast✓ stable

SymbolDescriptionModuleStability
InfiniteScrollTriggerInfinite scroll trigger elementlexigram.ui.molecules.virtual_scroll🔬 experimental
VirtualScrollVirtual scrolling containerlexigram.ui.molecules.virtual_scroll🔬 experimental
RealTimeFeedReal-time update feedlexigram.ui.molecules.realtime🔬 experimental
LiveCounterLive-updating counterlexigram.ui.molecules.realtime🔬 experimental

SymbolDescriptionModuleStability
BuilderDynamic form/component builderlexigram.ui.molecules.builder🔬 experimental

SymbolDescriptionModuleStability
FormFull form organism with validationlexigram.ui.organisms.forms✓ stable
RepeaterRepeatable form sectionlexigram.ui.organisms.repeater🔬 experimental
ChartChart componentlexigram.ui.organisms.charts🔬 experimental
ActivityFeedActivity timeline feedlexigram.ui.organisms.charts🔬 experimental
SlideOverSlide-over panellexigram.ui.organisms.slide_over🔬 experimental

SymbolDescriptionModuleStability
LayoutBaseBase class for layout componentslexigram.ui.layouts.base_layout✓ stable
BaseLayoutContextRender context for layout executionlexigram.ui.layouts.base_layout✓ stable
CSSManagerManages CSS resource inclusionlexigram.ui.layouts.base_layout✓ stable
JSManagerManages JS resource inclusionlexigram.ui.layouts.base_layout✓ stable
HTMLDocumentFull HTML document shelllexigram.ui.layouts.html_document✓ stable
FooterLinkLink data for footer renderinglexigram.ui.layouts.footer✓ stable
FooterRendererFooter section rendererlexigram.ui.layouts.footer✓ stable
HeadRendererHead section rendererlexigram.ui.layouts.head✓ stable

SymbolDescriptionModuleStability
COMPONENT_REGISTRYDict of 12 registerable component entrieslexigram.ui.cli.registry✓ stable
ComponentEntryDataclass: name, description, source_path, dependencies, requireslexigram.ui.cli.registry✓ stable

SymbolDescriptionModuleStability
RenderCacheLRU cache for rendered componentslexigram.ui.performance.performance✓ stable
RequestCoalescerCoalesce duplicate render requestslexigram.ui.performance.performance🔬 experimental
ResponseOptimizerETag-based HTMX response optimizationlexigram.ui.performance.performance✓ stable
add_htmx_timing_headerAdd server-timing headers to HTMX responseslexigram.ui.performance.performance✓ stable
cached_renderDecorator for cached component renderinglexigram.ui.performance.performance🔬 experimental
debounced_search_attrsGenerate debounced HTMX search attributeslexigram.ui.performance.performance✓ stable
infinite_scroll_triggerGenerate infinite scroll HTMX attributeslexigram.ui.performance.performance✓ stable
lazy_load_placeholderGenerate lazy-load placeholderlexigram.ui.performance.performance✓ stable
measure_render_timeDecorator to measure component render timelexigram.ui.performance.performance🔬 experimental
optimize_htmx_responseApply ETag and timing to HTMX responseslexigram.ui.performance.performance🔬 experimental

SymbolDescriptionModuleStability
MetricsCollectorIn-memory UI metrics collectorlexigram.ui.performance.observability✓ stable
MetricProtocolProtocol for metric implementationslexigram.ui.performance.observability✓ stable
MetricTypeEnum of metric types (counter, gauge, histogram)lexigram.ui.performance.observability✓ stable