Documentation

Keyvalue extends Component

Keyvalue Laravel Blade Component

A key-value pair input component that allows users to add, edit, and remove key-value pairs. Features customizable labels, hints, and placeholders for enhanced user experience.

Features:

  • Dynamic addition and removal of key-value pairs
  • Customizable labels and placeholders
  • Form validation integration
  • Bulma CSS framework integration
  • Mobile-friendly responsive design
Tags
author

V360

version
1.0.0
since
2024-07-20
example

<x-vform-keyvalue name="settings" :value="['theme' => 'dark', 'notifications' => 'enabled']" label="Settings" placeholderKey="Enter Key" placeholderValue="Enter Value" hint="Add your settings as key-value pairs." />

Table of Contents

$hint  : string|null
$id  : string
$isNumber  : bool
Type of value filed is number or not
$label  : string|null
$name  : string
$placeholderKey  : string
$placeholderValue  : string
$value  : mixed
$valueRequired  : bool
Value is required or not
$values  : Collection
__construct()  : mixed
Create a new component instance
render()  : View|string
Get the view / contents that represent the component.

Properties

$isNumber

Type of value filed is number or not

public bool $isNumber = false

$placeholderKey

public string $placeholderKey

$placeholderValue

public string $placeholderValue

$valueRequired

Value is required or not

public bool $valueRequired = true

Methods

__construct()

Create a new component instance

public __construct(string $name[, mixed $value = null ][, string|null $id = null ][, mixed $label = null ][, array<string|int, mixed> $attributes = [] ][, string|null $placeholderKey = null ][, string|null $placeholderValue = null ][, string|null $hint = null ][, bool $isNumber = false ][, bool $valueRequired = true ]) : mixed
Parameters
$name : string
$value : mixed = null
$id : string|null = null
$label : mixed = null
$attributes : array<string|int, mixed> = []
$placeholderKey : string|null = null
$placeholderValue : string|null = null
$hint : string|null = null
$isNumber : bool = false
$valueRequired : bool = true
Return values
mixed

render()

Get the view / contents that represent the component.

public render() : View|string
Return values
View|string

Search results