AnyLumino
API referenceastryxbase

Widget

Base anywidget for Astryx-backed components.

Attributes

attributecomponent_family
= t.Unicode('astryx').tag(sync=True)
attributecomponent_name
= t.Unicode('Stack').tag(sync=True)
attributeprops
= t.Dict(default_value={}).tag(sync=True)
attributecolor_mode
= t.Enum(_ASTRYX_THEME_MODES, default_value='light').tag(sync=True)
attributetheme
= t.Unicode('neutral').tag(sync=True)
attributebrand
= t.Dict(default_value={}).tag(sync=True)
attributecontinuous_update
= t.Bool(True).tag(sync=True)
attributesearch_mode
= t.Unicode('static').tag(sync=True)
attributeitemslist[Any]

Option records of the component.

Components store their records under the Astryx prop they render with, items for most components and options for the selector family. This accessor reads and writes the right key, so notebooks can update any record-backed component the same way::

selector.items = ["call", "put1"]

Functions

constructor__init__(component_name='Stack', children=None, *, props=None, text='', label='', value=None, disabled=False, variant='', brand=None, color_mode='light', continuous_update=True, search=None, callbacks=None, action_callbacks=None, open=None, width=None, height=None, **kwargs) -> None
paramcomponent_namestr
= 'Stack'

Frontend Astryx component name registered in the anylumino bridge.

paramchildrenChildInput
= None

Child widget, sequence of widgets, or mapping of slot names to widgets.

parampropsMapping[str, Any] | None
= None

Additional JSON-safe props for the selected Astryx component. Use this for component options that are not modeled as widget traits. anylumino manages widget composition, value synchronization, callbacks, and brand/theme traits separately. Upstream React-only values such as functions, refs, and React nodes are not serializable from Python. See the Astryx docs for the selected component page, for example https://astryx.atmeta.com/components/Blockquote.

paramtextstr
= ''

Text content synchronized to the frontend.

paramlabelstr
= ''

Visible or accessible component label.

paramvalueAny
= None

Synchronized component value.

paramdisabledbool
= False

Whether the component is disabled.

paramvariantstr
= ''

Astryx visual variant.

parambrandMapping[str, Any] | None
= None

Runtime or built Astryx theme descriptor.

paramcolor_modestr
= 'light'

Astryx Theme mode. Use "light", "dark", "system" to follow the OS prefers-color-scheme, or "jupyterlab" to follow the JupyterLab theme.

paramcontinuous_updatebool
= True

Whether Python receives text input, number input, and slider values while the user edits. When False the value syncs on blur, on Enter, and at the end of a slider drag.

paramsearchCallable[[str], Iterable[Any]] | None
= None

Optional Python-backed search callback for Typeahead, Tokenizer, and CommandPalette. It receives the typed query and returns the matching items, and is the only path by which the query reaches Python. Astryx debounces the call by its debounceMs prop, 150ms by default; pass debounceMs=0 for a local source that needs no debouncing. Without a callback the component filters its own items in the browser and nothing is sent per keystroke.

paramcallbacksIterable[Callable[[ComponentWidget], None]] | None
= None

Python activation callbacks. They run on clicks for event components and on every value change for value components.

paramaction_callbacksIterable[Callable[[ComponentWidget, Any], None]] | None
= None

Python callbacks receiving named action values or the new value.

paramopenbool | None
= None

Optional controlled open state.

paramwidthint | float | str | None
= None

Component host width.

paramheightint | float | str | None
= None

Component host height.

paramkwargsAny
= {}

Returns

None
funcapply_brand(brand, *, color_mode=None) -> None

Apply a reusable Astryx brand identity to this widget subtree.

parambrandMapping[str, Any] | None
paramcolor_modestr | None
= None

Returns

None

On this page