The easiest way to add buttons with Leaflet — so simple it fits in a gif:
YOUR_LEAFLET_MAP as a placeholder;
remember to change it to the variable name of your map.
open a popup
var helloPopup = L;L;
set the map's center and use an
img for the icon
change the button's function and appearance
var stateChangingButton = L;stateChangingButton;
2.x.x and up expect Leaflet
1.x.x or higher;
0.7.x use EasyButton
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet-easybutton@2/src/easy-button.css"> <script src="https://cdn.jsdelivr.net/npm/leaflet-easybutton@2/src/easy-button.js"></script>
npm install --save leaflet-easybutton
bower install --save Leaflet.EasyButton
If you haven't already, make sure to install/include the icon library of your choice (your lib should have its own instructions) — EasyButton should work with anything!