--- permalink: /javascript/ redirect_from: /docs/framework/javascript/ title: JavaScript description: Easily add flash notification messages to your JavaScript application with PHPFlasher. Follow our step-by-step guide to install the library using npm or include it in your project using CDN links, and start engaging and informing your users with powerful flash messages. --- {% PHPFlasher %} assets can be installed from a cdn or using npm ## Installation Quick start guide for installing the {% PHPFlasher %} from cdn or npm. --- ### cdn To pull in the {% PHPFlasher %} via CDN, grab the latest version from [jsdelivr](https://www.jsdelivr.com/package/npm/@flasher/flasher) cdn-jsdelivr ```html ``` --- ### npm To install {% PHPFlasher %} from npm use the following command: ```shell npm i @flasher/flasher ``` ## Usage ```javascript import flasher from "@flasher/flasher"; window.flasher = flasher; // only if you want to use it globally flasher.error("Oops! Something went wrong!"); flasher.warning("Are you sure you want to proceed ?"); flasher.success("Data has been saved successfully!"); flasher.info("Welcome back"); ``` or if you are using a cdn like this: ```html ``` --- ### Other adapters First grad the cdn for any js library adapter supported by {% PHPFlasher %} or install it with npm and then call the `create()` method on flasher object : ```html ```