JavaScript API
Sprout exposes a small set of methods on the Sprout object. The full reference is in the Reference section.
See JavaScript API for:
init— auto-called when the script loads; registers custom elements and event delegationsetTheme,getTheme,toggleTheme— theme controltoast(message, options)— transient notificationstooltip(element, text, options)— programmatic tooltips
Modals, dismissible alerts, copy button, nav and sidebar collapse, tabs, and dropdowns are driven by markup and do not require API calls once the script is loaded.