Overview of Mary UI
Mary UI is a library of gorgeous UI components specifically designed for Laravel Livewire. It is built on top of daisyUI and Tailwind CSS, allowing developers to build complex interfaces with minimal effort.
website·Indexed 33 days ago
https://mary-ui.comA UI component library for Laravel 12+ and Livewire that relies on daisyUI and Tailwind CSS. It provides a wide range of components including tables, forms, charts, calendars, and a global search spotlight, along with a bootcamp for implementing authentication and user management.
composer require robsontenorio/mary
php artisan mary:install
yarn dev # or `npm run dev`config/mary.php with a global prefix to prevent component name collisions. In these projects, you must use the prefixed component names (e.g., <x-mary-button>, <x-mary-card>, <x-mary-icon>).{{-- Example: Using maryUI input instead of starter kit inputs --}}
<x-mary-input label="Name" wire:model="name" /><x-spotlight /> tag in your main layout and create a backend search class. By default, this class should be App\Support\Spotlight and must contain a search method that returns a collection of results. Each result item must be an array containing name, description, and link. Optionally, you can include an avatar (image URL) or an icon (pre-rendered Blade icon).<body
...
<x-spotlight />
</body>namespace App\Support;
use Illuminate\Http\Request;
class Spotlight
{
public function search(Request $request)
{
// Implement search logic here
return collect([
[
'name' => 'Mary',
'description' => 'Software Engineer',
'link' => '/users/1',
'avatar' => 'http://...'
]
]);
}
}// Before: views/pages/users/show.blade.php
use Livewire\Volt\Component;
new class extends Component {
// ...
}
// After: views/pages/users/show.blade.php
use Livewire\Component;
new class extends Component {
// ...
}signature_pad library. To use it, you must include the signature_pad UMD build in your HTML head.<head>
...
{{-- Signature Pad --}}
<script src="https://cdn.jsdelivr.net/npm/@szimek/signature_pad@4.1.1/dist/signature_pad.umd.min.js"></script>
</head>The link attribute allows making table cells clickable. You can use {token} placeholders that are replaced by the values of the keys defined in $headers.
To disable links for specific columns, add 'disableLink' => true to that column's header configuration. You can also use Laravel's route() helper with [key] notation.
{{-- Simple token replacement --}}
<x-table :headers="$headers" :rows="$users" link="/users/{id}" />
{{-- Using Laravel route helper --}}
<x-table :headers="$headers" :rows="$users" :link="route('users.show', ['username' => '[username]', 'id' => '[id]'])" />
{{-- Header config to disable link for a specific column --}}
$headers = [
['key' => 'city.name', 'label' => 'City', 'disableLink' => true],
];<head> of your document.<head>
...
{{-- Ace Editor --}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.39.1/ace.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.39.1/ext-language_tools.min.js"></script>
</head>disabled key set to true within the object in the options array.@php
$users = [
['id' => 1, 'name' => 'John'],
['id' => 2, 'name' => 'Doe'],
['id' => 3, 'name' => 'Mary', 'disabled' => true],
['id' => 4, 'name' => 'Kate'],
];
@endphp
<x-group label="Select one" wire:model="selectedUser3" :options="$users" /># Clone the repository into your project root
git clone github.com:robsontenorio/mary.git packages/mary
# Add the local repository to composer config
composer config repositories.local '{"type": "path", "url": "packages/mary"}'
# Require the package again for local symlink
composer require robsontenorio/mary:@dev
# Start the dev server
yarn devcomposer require robsontenorio/mary
php artisan mary:install
# Start dev server
yarn dev # or `npm run dev`