PHP code example of inlayphp / design

1. Go to this page and download the library: Download inlayphp/design library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

inlayphp / design example snippets


use Inlay\Design\Design;

$theme = Design::default()
    ->named('acme')
    ->accent('#7c3aed', '#ffffff')
    ->radius('0.875rem')
    ->font('Inter, ui-sans-serif, system-ui')
    ->tokens([
        'sidebar-width' => '18rem',
        'control-height' => '2.75rem',
    ])
    ->darkTokens([
        'accent' => '#c4b5fd',
        'surface' => '#17131f',
    ]);

use Inlay\Theme\Theme;

$panel->theme(Theme::orbit()->accent('#2563eb'));

namespace App\Inlay\Themes;

use Inlay\Design\Design;
use Inlay\Theme\Theme;

final class BrandTheme
{
    public static function make(): Theme
    {
        return Design::default()->named('brand');
    }
}

use Inlay\Design\Design;

$css = Design::css($theme);
$variables = Design::variables($theme->light());
bash
php artisan make:inlay-theme Brand
bash
php artisan make:inlay-theme Billing/Brand \
    --path=app/Inlay/Themes \
    --css-path=resources/css/inlay \
    --force