Livewire Toggle switch with alert notification
Tech Stack: bootstrap-5, new, livewire
Demo
Name | Active | |
---|---|---|
Ashley Rohan | swift.athena@example.net | |
Harold Bogan | aaliyah70@example.net | |
Keegan Ferry | wkub@example.net | |
Prof. Flossie Grant | stracke.uriah@example.org | |
Bennett Smitham | mclaughlin.palma@example.org | |
Reina Becker | fredrick.schuppe@example.net | |
Abdiel Koepp Jr. | duncan.ziemann@example.net | |
Evelyn O'Conner DDS | witting.josiah@example.com | |
Shanelle Wolf | dlegros@example.net | |
Mrs. Coralie Yost DDS | kris.xzavier@example.org |
Code
Please login to View/Download the Code
Please login to View/Download the Code
Sorry, this component's code is restricted
Get Livewiredemos-Pro
Sorry, this component's code is restricted
Get Livewiredemos-Pro
Usage
@livewire('toggle-switch-alert', [
'model' => $dummyUser,
'field' => 'isActive',
'status' => [
'off' => "User {$dummyUser->name} is disabled",
'on' => "User {$dummyUser->name} is enabled"
]
])
Documentation
This component is an extention of Simple Toggle Switch Component
This is a toggle-switch with an alert livewire component using bootstrap-5 which alters the boolean field in the database and also shows an alert notification to the user.
For the alerts, we have done a simple integration with Notyf javascript plugin. You can read more about Livewire Notyf Integration.