PHP code example of daniellefence / buttons
1. Go to this page and download the library: Download daniellefence/buttons library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
daniellefence / buttons example snippets
// Basic usage
<x-df::button>
Default
</x-df::button>
// With variant and size
<x-df::button variant="primary" size="lg">
Submit
</x-df::button>
// With outline and block
<x-df::button variant="secondary" outline block>
Full Width
</x-df::button>
// With an icon
<x-df::button variant="success">
<x-slot name="icon">
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
</svg>
</x-slot>
Save
</x-df::button>
// With Livewire loading indicator
<x-df::button wire:click="save" wire:loading.attr="disabled">
<x-slot name="icon">
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
</svg>
</x-slot>
Saving...
</x-df::button>
// With loading spinner
<x-df::button loading>
Loading...
</x-df::button>