Search by

sleak / support

adamalexandersson

Shared utilities for the Sleak theme: attribute, class, and inline-style factories, color, slugs, and general helpers.

Package info

github.com/sleak/support

Type:package

pkg:composer/sleak/support

Statistics

Installs: 52

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 2

v1.0.1 2026-11-30 15:51 UTC

This package is auto-updated.

Last update: 2026-11-30 16:04:50 UTC


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