Thumbnail
Render an Astryx thumbnail image or placeholder.
Astryx Props
JSON-safe Thumbnail props forwarded to Astryx.
Supported Astryx props include:
src(string): Image source URL.alt(string): Alt text for the image.label(string): Accessible label (e.g. file name). Shown as tooltip on hover.onRemove((e: React.MouseEvent) => void): Callback for the overlaid remove button.onClick((e: React.MouseEvent) => void): Click handler. Adds button semantics and hover shadow.isLoading(boolean): Shows skeleton (no src) or upload overlay (with src).isDisabled(boolean): Whether the thumbnail is disabled.xstyle(StyleXStyles): StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.className(string): CSS class name for the root element. Prefer xstyle for styling; className is provided for integration with non-StyleX systems.style(CSSProperties): Inline styles for the root element. Prefer xstyle for styling; inline styles bypass StyleX optimization.data-testid(string): Test selector for automated testing frameworks.
Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.
See Astryx component docs: https://astryx.atmeta.com/components/Thumbnail.
Functions
constructor__init__(*, label='', src='', alt='', loading=None, disabled=False, removable=False, clickable=False, action_callbacks=None, **props) -> Noneparamlabelstr= ''Visible or accessible label for the component.
paramsrcstr= ''Image or media source URL.
paramaltstr= ''Accessible alternative text.
paramloadingbool | None= NoneWhether to show the loading presentation.
paramdisabledbool= FalseWhether interaction is disabled.
paramremovablebool= FalseWhether to show the remove control.
paramclickablebool= FalseWhether the thumbnail acts as a button.
paramaction_callbacksIterable[Callable[[ComponentWidget, Any], None]] | None= NonePython callbacks receiving "remove" or "click".
parampropsAny= {}Returns
None