Theming & Dark Mode Demo

This example demonstrates how to customize the fullscreen control icons and colors. Dark mode is just one example of theming.

Features:

Try it:

Customization:

Override the icon variables in your CSS (supports URL or inline SVG data-uri):

:root {
  --fullscreen-icon-enter: url('data:image/svg+xml;...');
  --fullscreen-icon-exit: url('your-exit-icon.svg');
}

/* Optional: Change icon color */
.leaflet-fullscreen-icon::before {
  background-color: #ff0000;
}