Skip to main content
The Button component creates a clickable button that triggers events.

Basic usage

Constructor

str | Callable
default:"'Run'"
Button label text
Literal['primary', 'secondary', 'stop', 'huggingface']
default:"'secondary'"
Button style:
  • "primary" - Main call-to-action
  • "secondary" - Subdued style
  • "stop" - Stop button
  • "huggingface" - HF branded style
Literal['sm', 'md', 'lg']
default:"'lg'"
Button size
str | Path | None
default:"None"
URL or path to icon file to display
URL to open when clicked
Where to open the linked URL
bool
default:"True"
Whether button is clickable

Events

  • click - Triggered when button is clicked

Examples

Primary button

With icon