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) -> Noneparamcomponent_namestr= 'Stack'Frontend Astryx component name registered in the anylumino bridge.
paramchildrenChildInput= NoneChild widget, sequence of widgets, or mapping of slot names to widgets.
parampropsMapping[str, Any] | None= NoneAdditional 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= NoneSynchronized component value.
paramdisabledbool= FalseWhether the component is disabled.
paramvariantstr= ''Astryx visual variant.
parambrandMapping[str, Any] | None= NoneRuntime 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= TrueWhether 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= NoneOptional 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= NonePython activation callbacks. They run on clicks for event components
and on every value change for value components.
paramaction_callbacksIterable[Callable[[ComponentWidget, Any], None]] | None= NonePython callbacks receiving named action values or the new value.
paramopenbool | None= NoneOptional controlled open state.
paramwidthint | float | str | None= NoneComponent host width.
paramheightint | float | str | None= NoneComponent host height.
paramkwargsAny= {}Returns
Nonefuncapply_brand(brand, *, color_mode=None) -> NoneApply a reusable Astryx brand identity to this widget subtree.
parambrandMapping[str, Any] | Noneparamcolor_modestr | None= NoneReturns
None