Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/steelants/laravel-form


https://github.com/steelants/laravel-form

Last synced: 3 days ago
JSON representation

Awesome Lists containing this project

README

        

# Laravel Form

Livewire compatible form elements. Styled with Bootstrap 5.

## Currently WIP

### Created by: [SteelAnts s.r.o.](https://www.steelants.cz/)

[![Total Downloads](https://img.shields.io/packagist/dt/steelants/form.svg?style=flat-square)](https://packagist.org/packages/steelants/form)

## Installation

```bash
pnpm i quill quill-table-ui
```

### Include scripts
app.js
```js
import './quill';
```

app.scss
```scss
import "./quill";
```

## Examples

### Form
Attributes:
- action
- method
```blade

...

...

```
Automatically inserts _method and _token base on method attribute
```html



...

...

```

### Input
Attributes:
- name - Input name (required for non-livewire use)
- label - Input label (optional)
- help - Help text
- group-class - Class of wrapping element
- value - value

```blade

```

### Select
Attributes:
- name - Input name (required for non-livewire use)
- label - Input label (optional)
- help - Help text
- group-class - Class of wrapping element
- options - Array of values
- value - Selected value (for non-livewire use)
- placeholder - Placeholder (hidden option withou value)
- value - value

```blade
@php
$options = [
1 => 'one',
2 => 'two',
3 => 'three',
];
@endphp

```

### Textarea
Attributes:
- name - Input name (required for non-livewire use)
- label - Input label (optional)
- help - Help text
- group-class - Class of wrapping element
- value - value

```blade

```

### Quill
- name - Input name (required for non-livewire use)
- label - Input label (optional)
- help - Help text
- group-class - Class of wrapping element

```blade

```

### Button
```blade
submit
```

## Notes
- Non-livewire elment require `name` attribute
- Livewire element require `wire:model*` attribute.
- Values are inserted with `old()`
- All attributes are passed down to input/select/texarea element.

## Other Packages
[steelants/laravel-auth](https://github.com/steelants/laravel-auth)
[steelants/laravel-boilerplate](https://github.com/steelants/Laravel-Boilerplate)
[steelants/datatable](https://github.com/steelants/Livewire-DataTable)
[steelants/form](https://github.com/steelants/Laravel-Form)
[steelants/modal](https://github.com/steelants/Livewire-Modal)
[steelants/laravel-tenant](https://github.com/steelants/Laravel-Tenant)