PHP code example of irajul / filament-shadcn-theme
1. Go to this page and download the library: Download irajul/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/ */
irajul / filament-shadcn-theme example snippets
namespace App\Providers\Filament;
use Filament\Enums\ThemeMode;
use Filament\Panel;
use Filament\PanelProvider;
use Irajul\FilamentShadcnTheme\Enums\BaseColor;
use Irajul\FilamentShadcnTheme\Enums\MenuAccent;
use Irajul\FilamentShadcnTheme\Enums\Radius;
use Irajul\FilamentShadcnTheme\Enums\SidebarVariant;
use Irajul\FilamentShadcnTheme\Enums\StyleVariant;
use Irajul\FilamentShadcnTheme\Enums\SurfaceShadow;
use Irajul\FilamentShadcnTheme\Enums\ThemeColor;
use Irajul\FilamentShadcnTheme\FilamentShadcnThemePlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->defaultThemeMode(ThemeMode::Dark)
->darkMode(true)
->plugin(
FilamentShadcnThemePlugin::make()
->style(StyleVariant::Lyra)
->baseColor(BaseColor::Taupe)
->themeColor(ThemeColor::Taupe)
->chartColor(ThemeColor::Taupe)
->font('inter')
->headingFont('inherit')
->radius(Radius::None)
->menuAccent(MenuAccent::Subtle)
->sidebarVariant(SidebarVariant::Sidebar)
->surfaceShadow(SurfaceShadow::ExtraSmall)
);
}
}