italia/design-laravel-theme
A Laravel theme package that brings the Italian public administration design system to your app, offering Blade-friendly Bootstrap Italia styling and UI components for accessible, consistent interfaces.
The package is a Blade + asset theme for Bootstrap Italia (the Italian public administration design system, itself a Bootstrap 4 derivative). It targets Laravel 5.x, so treat it as a legacy-era package — the first thing you should do is confirm your Laravel version matches what the README claims, since Laravel 6+ changed service-provider auto-discovery and Laravel 9+ ships Vite instead of Mix.
Minimal onboarding:
composer require italia/design-laravel-theme
Then publish whatever the service provider exposes. Check the tag names in the README, but the common pattern is:
php artisan vendor:publish --provider="Italia\\DesignLaravelTheme\\DesignLaravelThemeServiceProvider"
Where to look first after publishing:
config/design-laravel-theme.php — theme paths, asset locations, any locale/logo toggles.resources/views/vendor/design-laravel-theme/ — the Blade layouts and partials you'll actually extend.public/vendor/design-laravel-theme/ — published CSS/JS/fonts/SVG sprites.First use case: replace an existing resources/views/layouts/app.blade.php with the package's layout. The typical invocation is:
@extends('design-laravel-theme::layouts.app')
@section('title', 'Sportello telematico')
@section('content')
<div class="container">
{{-- Bootstrap Italia markup here --}}
</div>
@endsection
If the README documents a head-assets / footer-scripts partial, include those explicitly rather than assuming the layout bundles everything — that's usually the fastest way to see the theme render correctly.
Extend, don't edit vendor. Publish views once, then make a project layout that @extends the vendor one and overrides only the sections you care about (header, footer, breadcrumbs, skip-links). This keeps upgrades survivable — important for a package with 16 stars that likely isn't on a release cadence.
Two asset strategies. You can either (a) consume the published Bootstrap Italia CSS/JS from public/vendor/... and load them with plain <link>/<script> tags, or (b) install bootstrap-italia from npm and drive it through laravel-mix. For Laravel 5 + a legacy build, (a) is lower friction; for newer projects, (b) is preferable because Mix/Vite fingerprinting gives you cache busting the published assets won't have.
Component partials as macros. Bootstrap Italia ships a lot of repeated markup (headers, footers, breadcrumbs, callouts, it-card, it-list). Wrap them as Blade includes or @components inside resources/views/components/ so controllers and views stay readable:
@include('components.italia-breadcrumb', ['items' => $crumbs])
@include('components.italia-card', ['title' => $post->title, 'url' => route('posts.show', $post)])
Route-aware theming. Public-facing routes get the Italia layout; admin/backoffice routes usually keep a plain Bootstrap or Laravel Nova/Breeze layout. Set a theme variable in a base controller or a middleware so you're not repeating @extends decisions across every view.
Accessibility and language config. Bootstrap Italia is opinionated about lang="it", skip-links, ARIA landmarks, and structured headers. Wire the lang attribute and $title through a small LayoutComposer (view composer) so every page inherits a consistent <html lang>, <title>, and meta description. This is the single highest-value integration pattern for public-sector sites.
Testing. Add a Dusk or Pest/PHPUnit smoke test rendering a canonical page and asserting the Italia classes (it-header-wrapper, it-footer) are present. It's a cheap guard against accidental layout breaks during upgrades.
composer.json's illuminate/support constraint before adding it. If it's ^5.x, you'll need to fork or extract the Blade views manually to use them on a modern stack.config/app.php and the facade/alias if any. Publish commands silently fail without the provider registered — this is the #1 "I installed it and nothing happened" cause.--force sparingly. vendor:publish --force overwrites your customized views. Once you've edited a published view, either track it in git and diff on upgrades, or stop publishing and rely on @extends overrides only.mime.types on Nginx (.woff2, image/svg+xml) and that public/vendor/... is web-accessible — some deploys ship public/ as a symlink and break published assets.composer require italia/design-laravel-theme:1.x.y) and commit composer.lock. Treat the package as a starting point, not a maintained dependency.resources/views/layouts/ and dropping the dependency is often faster than waiting for upstream.bootstrap-italia.min.css is 200, not 404. The theme's layout partials are thin wrappers; a missing asset is almost always the real cause.How can I help you explore Laravel packages today?