Skip to main content
The DownloadButton creates a button that downloads a file when clicked.

Basic usage

Constructor

str
default:"'Download'"
Button label text
str | Path | Callable | None
default:"None"
Filepath or URL to download. Can be a function that returns the path
Literal['primary', 'secondary', 'stop']
default:"'secondary'"
Button style variant
Literal['sm', 'md', 'lg']
default:"'lg'"
Button size

Events

  • click - Triggered when button is clicked

Examples

Dynamic download

Primary button