☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

How set an Icon for Button widget?

Community Support
MaxDX
MaxDX

It seems that my problem is quite simple. But I’m got stucked at the embedding icon into Button.
From documentation I’m figured out that Button model has an icon property with some Nullable(Instance(AbstractIcon)) type.
But I really can’t understand that I should set to this Icon property (URL, file-path or something else) ?
All my tries ends with same errors like:
expected either None or a value of type Instance(AbstractIcon), got ...
My icons are stored on local, but also must be downloaded from URL.
Unfortunately I don’t find any examples at docs, support and stackoverflow. But I am realizing that answer is very very simple.

⌁   Link to post
Bryan
Bryan

There’s not currently any built-in icon for support for buttons at this time. The icon property was a minimal concession added to support some users who wanted to proceed with a custom extension use-case. It’s more work, but you can refer to a complete custom extension example here:

bokeh/examples/custom/font-awesome at branch-2.4 · bokeh/bokeh · GitHub

bokeh/examples/custom/font-awesome at branch-3.0 · bokeh/bokeh · GitHub

You’ll need to refer to a branch appropriate for your installed bokeh version.

⌁   Link to post

End of archived discussion · Replies are disabled