PHP code example of openplain / filament-shadcn-theme

1. Go to this page and download the library: Download openplain/filament-shadcn-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/ */

    

openplain / filament-shadcn-theme example snippets


use Openplain\FilamentShadcnTheme\Color;

public function panel(Panel $panel): Panel
{
    return $panel
        ->colors([
            'primary' => Color::Default,  // The Shadcn effect
        ]);
}

Color::Default  // Inverted grays (Shadcn's signature)
Color::Red      // Vibrant red
Color::Rose     // Soft rose
Color::Orange   // Warm orange
Color::Green    // Fresh green
Color::Blue     // Classic blue
Color::Yellow   // Bright yellow
Color::Violet   // Rich violet

use Filament\Support\Colors\Color as FilamentColor;

'primary' => Color::adaptive(
    lightColor: FilamentColor::Blue,
    darkColor: FilamentColor::Teal
)