MediaSelect
extends Component
in package
MediaSelect Laravel Blade Component
A media selection input component that allows users to select media items from a predefined list. Features customizable labels, hints, and placeholder text for enhanced user experience.
Features:
- Media item selection from a list
- Optional media preview
- Customizable labels and hints
- Form validation integration
- Bulma CSS framework integration
- Mobile-friendly responsive design
Tags
Table of Contents
- $containerWidth : int
- $defaultLabel : string|null
- $defaultSrc : mixed
- $hint : string|null
- $id : string
- $isRight : bool
- $itemWidth : int
- $label : string|null
- $name : string
- $options : mixed
- $placeholder : string|null
- $preview : bool
- $value : string|null
- __construct() : mixed
- Create a new component instance
- render() : View|string
- Get the view / contents that represent the component.
Properties
$containerWidth
public
int
$containerWidth
$defaultLabel
public
string|null
$defaultLabel
= null
$defaultSrc
public
mixed
$defaultSrc
= null
$hint
public
string|null
$hint
= null
$id
public
string
$id
$isRight
public
bool
$isRight
= false
$itemWidth
public
int
$itemWidth
$label
public
string|null
$label
= null
$name
public
string
$name
$options
public
mixed
$options
$placeholder
public
string|null
$placeholder
= null
$preview
public
bool
$preview
$value
public
string|null
$value
= null
Methods
__construct()
Create a new component instance
public
__construct(string $name[, mixed $value = null ][, string|null $id = null ][, mixed $options = [] ][, mixed $label = null ][, string $placeholder = 'Select' ][, bool $preview = true ][, int $containerWidth = 600 ][, int $itemWidth = 200 ][, bool $isRight = false ][, string|null $hint = null ]) : mixed
Parameters
- $name : string
- $value : mixed = null
- $id : string|null = null
- $options : mixed = []
- $label : mixed = null
- $placeholder : string = 'Select'
- $preview : bool = true
- $containerWidth : int = 600
- $itemWidth : int = 200
- $isRight : bool = false
- $hint : string|null = null
Return values
mixed —render()
Get the view / contents that represent the component.
public
render() : View|string