salahhusa9/laravel-template-components

Laravel template components, can use with vuexy and metronic templates


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package is a collection of components that can be used with vuexy and metronic templates, and it can be used with any other template by changing the config file.

Installation

You can install the package via composer:

composer require salahhusa9/laravel-template-components

You can publish the config file with:

php artisan laravel-template-components:install

Usage

Input Component

<x-template-components::input />

He accept all normal attributes of input tag and add some new attributes:

  • div-class: add class to div tag
  • label-class: add class to label tag
  • other attributes will be added to input tag

Button Component

<x-template-components::button />

He accept all normal attributes of button tag and add some new attributes:

  • div-class: add class to div tag
  • span-text-class: add class to span tag that contain button text
  • indicator-progress-class: add class to span tag that contain button progress indicator
  • loading-text: text that will be shown when button is loading
  • spinner-class: add class to span tag that contain button spinner
  • other attributes will be added to button tag

we support livewire loading state, so if you use livewire you can use loading state like this:

<x-template-components::button wire:target="save" />

Select Component

<x-template-components::select>
    <option value="1">option 1</option>
    <option value="2">option 2</option>
</x-template-components::select>

He accept all normal attributes of select tag and add some new attributes:

  • div-class: add class to div tag
  • label-class: add class to label tag
  • other attributes will be added to select tag

Textarea Component

<x-template-components::textarea />

He accept all normal attributes of textarea tag and add some new attributes:

  • div-class: add class to div tag
  • label-class: add class to label tag
  • other attributes will be added to textarea tag

Form Component

<x-template-components::form>
    
</x-template-components::form>

he accept all normal attributes of form tag and add some new attributes:

  • route: route name that will be used in form action
  • other attributes will be added to form tag

Supported Templates

Version Supported
Vuexy
Metronic
Html Standards

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.