Skip to content

aalaap/laravel-livewire-daisyui-starter-kit

 
 

Repository files navigation

Laravel + Livewire Starter Kit with daisyUI

Introduction

This Laravel + Livewire starter kit with daisyUI provides a robust, modern starting point for building Laravel applications with a Livewire frontend and daisyUI components.

This Livewire starter kit utilizes Livewire 3, Laravel Volt, Folio, Tailwind CSS 4 and daisyUI 5.

Livewire is a powerful way of building dynamic, reactive, frontend UIs using just PHP. It's a great fit for teams that primarily use Blade templates and are looking for a simpler alternative to JavaScript-driven SPA frameworks like React and Vue.

Volt is an elegantly crafted functional API for Livewire that supports single-file components, allowing a component's PHP logic and Blade templates to coexist in the same file.

Folio is a powerful page based router designed to simplify routing in Laravel applications. With Laravel Folio, generating a route becomes as effortless as creating a Blade template within your application's resources/views/pages directory.

daisyUI is a UI component library built on top of Tailwind CSS, which provides ready-made component classes that are fully themable and composable.

Motivation

Laravel 12's new starter kits are offered with React/Vue + Inertia + shadcn/ui or Livewire with Flux. While shadcn/ui is open source, Flux is not. While the new starter kit does include some Flux components for free, the documentation for these is also paywalled, which doesn't seem right to me. daisyUI is a good component library that's open source, just like shadcn/ui, and it works with plain HTML, which makes it a great fit for Blade and Livewire components.

The new starter kits are now simply git repos that can be cloned and worked upon, rather than projects created live by the installer by adding components like Breeze and Jetstream. This makes it easier for anyone to create and offer any different combinations of technologies as they see fit.

I've been using daisyUI for a while and I'm building this starter kit with it for my own needs, but I do hope someone else finds it useful as well.

Status

All Flux components have been replaced by daisyUI component equivalents. The main app layouts are also using daisyUI, but there is still some optimization pending and some additional components and/or partials may be created.

You can start using it now and create issues if you run into any problems.

Official Documentation

Documentation for all Laravel starter kits can be found on the Laravel website.

Documentation for daisyUI is on the official website.

Docs specific to this starter kit will be included here.

Components

The following components are available:

daisyUI Flux Note
x-daisyui.navlist flux:navlist
x-daisyui.navlist-item flux:navitem
x-daisyui.button flux:button
x-daisyui.link flux:link
x-daisyui.heading flux:heading, flux:subheading Can be used for both headings.
x-daisyui.separator flux:separator variant behaves differently; direction, align added.
x-daisyui.input flux:input Needs $errors to be passed explicitly.
x-daisyui.modal flux:modal Works differently
x-daisyui.modal.toggle flux:modal.trigger Works differently
x-daisyui.modal.actions flux:modal.close Works differently
x-daisyui.loading-spinner
x-daisyui-spacer flux:spacer

In addition to the explicit attributes (like variant and align), you can pass in any daisyUI or Tailwind CSS class name and it will be applied to the component. Other HTML attributes will also be passed as-is.

Note: Not all components will be drop-in replacements. For eg. the Flux button component has variants danger and filled, but daisyUI components have warning (or error) and neutral respectively. See daisyUI docs for more info.

Contributing

Feel free to open issues or send pull requests. The contribution guide for the original starter kit can be found in the Laravel documentation.

Code of Conduct

The code of conduct is based on the original Laravel one found here. In order to ensure that the community is welcoming to all, please review and abide by the code.

License

The Laravel + Livewire + daisyUI starter kit is open-sourced software licensed under the MIT license.

About

Laravel + Livewire starter kit with DaisyUI components

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Blade 53.3%
  • PHP 45.3%
  • CSS 1.2%
  • JavaScript 0.2%