The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

Tailwindcss

laravel-frontend-presets/tailwindcss image

Tailwindcss stats

Downloads
367.3K
Stars
1,145
Open Issues
3
Forks
144

View on GitHub →

Laravel frontend preset for Tailwind CSS

Laravel 7.0+ Frontend preset for Tailwind CSS

A Laravel front-end scaffolding preset for Tailwind CSS - a Utility-First CSS Framework for Rapid UI Development.

Usage

  1. Fresh install Laravel >= 7.0 and cd to your app.
  2. Install this preset via composer require laravel-frontend-presets/tailwindcss --dev. Laravel will automatically discover this package. No need to register the service provider.

a. For Presets without Authentication

  1. Use php artisan ui tailwindcss for the basic Tailwind CSS preset
  2. npm install && npm run dev
  3. php artisan serve (or equivalent) to run server and test preset.

b. For Presets with Authentication

  1. Use php artisan ui tailwindcss --auth for the basic preset, auth route entry, and Tailwind CSS auth views in one go. (NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php)
  2. npm install && npm run dev
  3. Configure your favorite database (mysql, sqlite etc.)
  4. php artisan migrate to create basic user tables.
  5. php artisan serve (or equivalent) to run server and test preset.

Config

The default tailwind.config.js configuration file included by this package simply uses the config from the Tailwind vendor files. Should you wish to make changes, you should remove the file and run node_modules/.bin/tailwind init, which will generate a fresh configuration file for you, which you are free to change to suit your needs.

Add a new i18n string in the resources/lang/XX/pagination.php file for each language that your app uses:

'previous' => '« Previous',
'next' => 'Next »',
'goto_page' => 'Goto page #:page', // Add this line

This should help with accessibility

<li>
<a href="URL?page=2" class="..."
aria-label="Goto page #2"
>
2
</a>
</li>

Pagination

Laravel now supports Tailwind CSS pagination directly. If you would like to use these views in your app, you can refer to docs.

Screenshots

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Laravel Frontend Presets Tailwindcss Related Articles

A TALL (Tailwind CSS, Alpine.js, Laravel, and Livewire) Preset for Laravel image

A TALL (Tailwind CSS, Alpine.js, Laravel, and Livewire) Preset for Laravel

Read article
LoadForge logo

LoadForge

Scalable load testing for web apps & APIs. Simulate real-world traffic and identify breaking points and performance limits with powerful, scalable load tests designed for Laravel.

LoadForge
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Typesense Search logo

Typesense Search

Typesense is an open source, blazing-fast search engine, optimized for helping you build delightful search experiences for your sites and apps. Natively integrated with Laravel Scout.

Typesense Search
Tighten logo

Tighten

We help companies turn great ideas into amazing apps, products, and services.

Tighten
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum