1. Components
  2. dissmissible

Dissmissible

User-dismissible content wrapper for alerts, notifications, and temporary messages.

Demo

Create dismissible content that users can close or hide. Commonly used for alerts, notifications, banners, and temporary messages.

Installation

Install the component

  1. Install the component

    Shell
    php artisan flexi:add dissmissible
  2. Install dependencies

    This component requires JavaScript. By default we use the interactive component library Flexilla .
    Shell
    npm i @flexilla/dissmissible
  3. Setup

    Add the plugin to your resources/js/app.js

    flexilla.js
    import { DissmissiblePlugin } from "./plugins/dissmissible";
    
    Alpine.plugin(DissmissiblePlugin)

API Reference

Prop Description
action (string)
Determines what happens when dismissed. Default is 'remove-from-dom' which removes the element from the document. Other options depend on your JavaScript setup.
closable (boolean)
Controls whether the close button is displayed. Default is true .
slot (HTML)
The main content to be displayed inside the dismissible component.

Examples

Alert Notification

Dismissible alert notifications for errors, warnings, and general information messages.

Custom close button

Composition

Prop Description
x-ui.dissmissible The main dismissible container component
x-ui.dissmissible.close The close button component (automatically included when closable is true )