PHP code example of inlayphp / theme

1. Go to this page and download the library: Download inlayphp/theme 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 / theme example snippets


use Inlay\Theme\Theme;

$theme = Theme::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' => '#a78bfa',
        'surface' => '#17131f',
    ]);

$panel->theme(Theme::highContrast());

$theme->name();  // acme
$theme->light(); // light token array
$theme->dark();  // dark overrides only