Download the PHP package codewithdennis/filament-simple-alert without Composer
On this page you can find all versions of the php package codewithdennis/filament-simple-alert. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codewithdennis/filament-simple-alert
More information about codewithdennis/filament-simple-alert
Files in codewithdennis/filament-simple-alert
Package filament-simple-alert
Short Description A plugin for adding straightforward alerts to your filament pages
License MIT
Homepage https://github.com/codewithdennis/filament-simple-alert
Informations about the package filament-simple-alert
Filament Simple Alert
If you're using Filament 3.x, check out the compatible version of this package here.
This package offers a straightforward and easy-to-use alert component for your Filament application. It allows you to quickly implement customizable alert messages, enhancing the user experience by providing clear and concise notifications.
![]()
Installation
You can install the package via composer:
Custom Theme
You will need to create a custom theme for the styles to be applied correctly.
Make sure you add the following to your theme.css file.
Usage
Make sure to import the SimpleAlert component at the top of your file:
`
Predefined Alerts
There are 4 types predefined of simple alerts: danger, info, success, and warning.
If you would like to use a different color, you can use the color method.
Icon
By default, simple alerts come with an icon. For example, the ->danger() method includes a heroicon-s-x-circle icon. If you want to use a different icon, you can use the icon method.
Or you can use a custom icon by passing an HTML string or a Blade component to the icon method.
Icon Animation
You can add animation to the icon by passing the animation type as the second parameter to the icon method. Make sure to use the IconAnimation enum for the animation type.
Icon Vertical Alignment
You can change the vertical alignment of the icon by using the iconVerticalAlignment method.
Title
You can add a title to the alert by using the title method.
Description
You can add a description to the alert by using the description method.
Border
You can add a border to the alert by using the border method.
Actions
You can also add actions to the alert by using the actions method. All regular action features are supported.
Actions Vertical Alignment
You can change the vertical alignment of the actions by using the actionsVerticalAlignment method.
Example
Contributing
Please see CONTRIBUTING for details.
Credits
- CodeWithDennis
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-simple-alert with dependencies
filament/filament Version ^4.0|^5.0
spatie/laravel-package-tools Version ^1.15.0