PHPackages                             wendelladriel/laravel-estilo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. wendelladriel/laravel-estilo

ActiveLibrary[Templating &amp; Views](/categories/templating)

wendelladriel/laravel-estilo
============================

Manage your CSS in PHP and easily use it on Blade

v0.3.0(2mo ago)2031MITPHPPHP ^8.2CI passing

Since Sep 15Pushed 2mo agoCompare

[ Source](https://github.com/WendellAdriel/laravel-estilo)[ Packagist](https://packagist.org/packages/wendelladriel/laravel-estilo)[ Fund](https://www.paypal.me/wendelladriel)[ GitHub Sponsors](https://github.com/WendellAdriel)[ RSS](/packages/wendelladriel-laravel-estilo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (5)Used By (0)

 [![Estilo for Laravel](https://github.com/WendellAdriel/laravel-estilo/raw/main/art/logo.png)](https://github.com/WendellAdriel/laravel-estilo/raw/main/art/logo.png)Estilo for Laravel
==================

[](#estilo-for-laravel)

 Manage your CSS in PHP and easily use it on Blade

 [![Packagist](https://camo.githubusercontent.com/e479b6c4a3fc92d55f0fc98e1e9344b28d03f3f999e8a42bf5535f10e794c58f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f57656e64656c6c41647269656c2f6c61726176656c2d657374696c6f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/WendellAdriel/laravel-estilo) [![PHP from Packagist](https://camo.githubusercontent.com/27afbe714ce962b462715fe3c8161641c562a1cdec7b6a9e88c13d09dbb5bcbf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f57656e64656c6c41647269656c2f6c61726176656c2d657374696c6f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/WendellAdriel/laravel-estilo) [![Laravel Version](https://camo.githubusercontent.com/c9598ee35f0c6ad033e18ed3c43d810a7c536cf8c2528ca4a9052492dac8200c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782c31332e782d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/WendellAdriel/laravel-estilo) [![GitHub Workflow Status (main)](https://camo.githubusercontent.com/895c2cd2a89da5a3d89cb8ddc17c44877f01a511040a2502859636fa8f0fa614/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f57656e64656c6c41647269656c2f6c61726176656c2d657374696c6f2f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473) ](https://github.com/WendellAdriel/laravel-estilo/actions)

Warning

This package is not stable yet, and breaking changes can be added even in minor versions before it reaches v1.0.0.

Check the **[Changelog](CHANGELOG.md)** for breaking changes, features and bug fixes.

Features
--------

[](#features)

- Create CSS styles in PHP in a fluent way.
- Easily add the CSS styles you want in Blade files with the `@estilo` directive.
- Group styles together with tags and include only the needed ones with `@estilo(['tag_1', 'tag_2'])`.
- The package provides hints for hundreds of CSS properties via the `@method` annotation to help you write your styles.
- TailwindCSS support for creating your own "classes" by grouping TailwindCSS classes.

Installation
------------

[](#installation)

```
composer require wendelladriel/laravel-estilo
```

Config
------

[](#config)

Publish the config file:

```
php artisan vendor:publish --provider="WendellAdriel\Estilo\Providers\EstiloServiceProvider" --tag=config
```

The config file will be added to `config/estilo.php`. It might feel quite unusual from the common config files you see.

Styles
------

[](#styles)

**Estilo** lets you define your CSS in PHP, using a fluent builder with autocompletion for hundreds of CSS properties.

### Defining a Style

[](#defining-a-style)

To define a new style you should use the `Estilo::define()` method inside the `config/estilo.php` file.

```
Estilo::define(
    selector: '#hero-title',
    css: CSS::make()
        ->color('blue')
        ->fontSize('30px'),
    tags: ['headers'],
);
```

Each time you call `Estilo::define()` you create a style definition. You can use any CSS selector that you would: classes, tags, ids, etc.

If you need the value to be wrapped in quotes, add double quotes when defining.

```
Estilo::define(
    selector: 'p',
    css: CSS::make()
        ->fontFamily('"Monaspace Neon", sans-serif'),
    tags: ['typograph'],
```

### Checking if a Style exists

[](#checking-if-a-style-exists)

To check if a style is already defined you can use the `Estilo::has()` method.

```
Estilo::has('#hero-title');
```

### Deleting a Style

[](#deleting-a-style)

To delete a style, you can use the `Estilo::forget()` method.

```
Estilo::forget('#hero-title');
```

### Tagging Styles

[](#tagging-styles)

You can pass a 3rd parameter to the `Estilo::define()` method that's an array of tags. This is especially powerful to create different stylesheets for your application.

Using the Styles in Blade
-------------------------

[](#using-the-styles-in-blade)

When you need to use any of the styles generated with **Estilo** in your Blade files, you can use the `@estilo`directive, by adding it to the `` tag of your page. This will load ALL the styles created with **Estilo** to your Blade file.

```

    @estilo

```

When you add the `@estilo` directive, it will create a `` tag with all the styles that are needed.

For example, this:

```
Estilo::define(
    selector: '.main-title',
    css: CSS::make()
        ->color('red')
        ->fontSize('20px'),
    tags: ['common', 'headers'],
);

Estilo::define(
    selector: '#hero-title',
    css: CSS::make()
        ->color('blue')
        ->fontSize('30px'),
    tags: ['headers'],
);

Estilo::define(
    selector: 'a',
    css: CSS::make()
        ->color('green')
        ->borderBottom('1px', 'dashed', 'green'),
);
```

Will generate this:

```

    .main-title { color: red; font-size: 20px; }
    #hero-title { color: blue; font-size: 30px; }
    a { color: green; border-bottom: 1px dashed green; }

```

### Adding only specific Styles

[](#adding-only-specific-styles)

You can use the tags feature to load only specific styles that you want. The example below will load only the styles tagged with the tags `common` and `typograph`.

```

    @estilo(['common', 'typograph'])

```

### Using Styles as inline style

[](#using-styles-as-inline-style)

You may need or want to use some of the defined styles as inline styles. For that you can use the `estilo()` helper function. With this you can use any of defined classes, even the ones not loaded with the `@estilo` directive.

```
INLINE STYLE

```

TailwindCSS support
-------------------

[](#tailwindcss-support)

**Estilo** lets you create "classes" that are groups of other TailwindCSS classes, similar to what you achieve with the `@apply`. This won't create a CSS class, but will allow you to use it in your Blade files as if it were.

### Defining a Style

[](#defining-a-style-1)

To define a new style you should use the `EstiloWind::define()` method inside the `config/estilo.php` file. Each time you call `EstiloWind::define()` you create a style definition.

```
EstiloWind::define(
    name: 'feat-text',
    classes: ['text-xl', 'text-amber-500', 'font-bold'],
);
```

### Checking if a Style exists

[](#checking-if-a-style-exists-1)

To check if a style is already defined you can use the `EstiloWind::has()` method.

```
EstiloWind::has('feat-text');
```

### Deleting a Style

[](#deleting-a-style-1)

To delete a style, you can use the `EstiloWind::forget()` method.

```
EstiloWind::forget('feat-text');
```

Using the Styles in Blade
-------------------------

[](#using-the-styles-in-blade-1)

To use your defined "classes" you can use the `estilowind()` helper function in your HTML class attribute.

```
Estilo for Laravel

```

Credits
-------

[](#credits)

- [Wendell Adriel](https://github.com/WendellAdriel)
- [All Contributors](../../contributors)

Contributing
------------

[](#contributing)

Check the **[Contributing Guide](CONTRIBUTING.md)**.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance85

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~81 days

Total

3

Last Release

76d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/565cea386dcfc4df5188a338113624866e65e4b31b209a7a99bb6c4c272e8731?d=identicon)[wendell\_adriel](/maintainers/wendell_adriel)

---

Top Contributors

[![WendellAdriel](https://avatars.githubusercontent.com/u/11641518?v=4)](https://github.com/WendellAdriel "WendellAdriel (27 commits)")[![adelf](https://avatars.githubusercontent.com/u/2818394?v=4)](https://github.com/adelf "adelf (1 commits)")

---

Tags

laravelcssuifrontend

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wendelladriel-laravel-estilo/health.svg)

```
[![Health](https://phpackages.com/badges/wendelladriel-laravel-estilo/health.svg)](https://phpackages.com/packages/wendelladriel-laravel-estilo)
```

###  Alternatives

[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.5k454.7k15](/packages/robsontenorio-mary)[area17/blast

Storybook for Laravel Blade

308664.1k](/packages/area17-blast)[hasinhayder/tyro-login

Tyro Login - Beautiful, customizable authentication views for Laravel 12 &amp; 13

2362.2k2](/packages/hasinhayder-tyro-login)[rogervila/laravel-legacy-ui

Legacy UI with Auth scaffolding for Laravel 8.x &amp; 9.x

559.5k](/packages/rogervila-laravel-legacy-ui)[electrik/slate

Slate - a Laravel Blade UI Kit is a set of anonymous blade components built using TailwindCSS v4 with built-in dark mode support for your next Laravel project

102.3k1](/packages/electrik-slate)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
