AnyLumino
API referenceastryxinputs

IconButton

Render an icon-only Astryx button.

Astryx Props

JSON-safe IconButton props forwarded to Astryx.

Supported Astryx props include:

  • label (string; required): Accessible label. Used as aria-label (not rendered as visible text).
  • icon (ReactNode; required): Icon element rendered inside the button.
  • variant ('primary' or 'secondary' or 'ghost' or 'destructive'): Visual style variant.
  • size ('sm' or 'md' or 'lg'): Size variant.
  • isLoading (boolean): Shows a loading spinner and disables interaction.
  • isDisabled (boolean): Disables the button.
  • tooltip (string): Tooltip text shown on hover.
  • onClick ((e: MouseEvent) => void): Standard click handler.
  • clickAction ((e: MouseEvent) => void or Promise<void>): Async click handler with automatic loading state.

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/IconButton.

Functions

constructor__init__(label, *, icon='close', variant='secondary', disabled=False, size=None, loading=None, tooltip=None, callbacks=None, **props) -> None
paramlabelstr

Visible or accessible label for the component.

paramiconstr
= 'close'

Astryx icon name.

paramvariantstr
= 'secondary'

Astryx visual variant.

paramdisabledbool
= False

Whether the component should render disabled.

paramsizestr | None
= None

Button size.

paramloadingbool | None
= None

Whether to show the loading state.

paramtooltipstr | None
= None

Hover tooltip text.

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

Python callbacks invoked for frontend activations.

parampropsAny
= {}

Returns

None

On this page