Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the 'icon' argument for ipywidgets.Button?

I am trying to understand how to display buttons in an jupyter notebook, but the documentation is a bis sparse on this item.

It is mentioned there is an argument 'icon'. But what does it mean? What values can be used? Is there some documentation hidden somewhere else?

like image 546
Alex Avatar asked Mar 02 '23 20:03

Alex


1 Answers

You can specify an icon from the Font Awesome 4.7 catalog, by prefacing with fa-.

https://fontawesome.com/v4.7.0/icons/

import ipywidgets as ipyw

ipyw.Button(
    description = 'Button',
    icon = 'fa-bullhorn',
)

enter image description here

like image 193
ac24 Avatar answered Apr 09 '23 04:04

ac24