InputSwitch
extends Component
in package
InputSwitch Laravel Blade Component
An input switch (toggle) component that allows users to switch between two states. Features customizable labels, colors, and hints for enhanced user experience.
Features:
- Toggle switch functionality
- Customizable labels and colors
- Form validation integration
- Livewire real-time updates
- Bulma CSS framework integration
- Mobile-friendly responsive design
Tags
Table of Contents
- $color : string
- $hint : string|null
- $id : string
- The unique ID of the input switch.
- $label : string
- $name : string
- __construct() : mixed
- Create a new component instance.
- render() : View|string
- Get the view / contents that represent the component.
Properties
$color
public
string
$color
= 'info'
$hint
public
string|null
$hint
= null
$id
The unique ID of the input switch.
public
string
$id
$label
public
string
$label
$name
public
string
$name
Methods
__construct()
Create a new component instance.
public
__construct(string $name, string $label[, string $color = 'info' ][, mixed $hint = null ]) : mixed
Parameters
- $name : string
-
Name of the input
- $label : string
-
Label of the input
- $color : string = 'info'
-
Color of the input switch
- $hint : mixed = null
-
Hint for the input
Return values
mixed —render()
Get the view / contents that represent the component.
public
render() : View|string