sleak / support
Shared utilities for the Sleak theme: attribute, class, and inline-style factories, color, slugs, and general helpers.
v1.0.1
2026-11-30 15:51 UTC
Requires
- php: ^8.2
- illuminate/support: ^11.0|^12.0|^13.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.29
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^3.8
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Small, framework-light helpers shared by the Sleak theme.
| Class | Purpose |
|---|---|
Sleak\Support\AttributeFactory |
Build an HTML attribute string |
Sleak\Support\ClassFactory |
Collect, dedupe, and escape class names |
Sleak\Support\InlineStyleFactory |
Build an inline style string |
Sleak\Support\Color |
Hex, RGB, HSL, and OKLCH conversion, mixing, and contrast |
Sleak\Support\Slug |
Normalize and denormalize search slugs |
Sleak\Support\General |
Link strings, boolean strings, JSON, ACF meta keys |
There is no service provider. Require the package and call the classes.
Install
composer require sleak/support
For local development, point Composer at a checkout:
{
"repositories": [
{
"type": "path",
"url": "../../../../../../Packages/support"
}
]
}
ClassFactory::get() returns the joined class string without escaping. AttributeFactory::get() escapes names and values. toArray() stays raw.
orchestra/testbench is a dev dependency so Larastan can boot an application. The library itself does not need it.
Documentation
Scripts
composer test
composer analyse
composer format
License
MIT