gabrielesbaiz/nova-card-html
A lightweight Laravel Nova card that lets you render custom HTML directly in your dashboard. Drop in raw HTML snippets, embeds, or simple widgets without building a full Vue component—just point the card at your content and it displays wherever you place it.
composer require gabrielesbaiz/nova-card-html and verify the constraint matches your Nova major (v3 likely targets Nova 5 / Laravel 11+; check composer.json after install).app/Nova/NovaServiceProvider.php inside cards() for dashboards, or in a resource’s cards() method for per-resource placement.// NovaServiceProvider::cards()
(new \Gabrielesbaiz\NovaCardHtml\Card)
->title('Quick Links')
->html('<a href="/nova/resources/users">Users</a> · <a href="/nova/resources/roles">Roles</a>')
->width('1/3'),
README, src/ card class for the exact fluent API (html(), view(), withMeta()), and the compiled JS in dist/ to confirm the component is registered.withMeta: pass computed values (counts, URLs, feature flags) into the card and interpolate them client-side or server-side, so the card stays reactive to Nova’s meta payload.canSee(), canSeeWhen(), onlyOnDetail(), onlyOnIndex()—to prevent sensitive HTML from rendering for unauthorized users.->width('1/2'), '1/3', 'full' to slot the card into Nova’s dashboard grid; test at tablet/mobile widths because raw HTML often breaks Nova’s responsive columns.cards() method to surface contextual HTML (e.g. external system links, onboarding instructions) on detail pages without writing a custom Vue component.HelpCard / Markdown behavior unless you specifically need raw HTML control.Purify, strip_tags allowlist). Prefer passing trusted Blade views over raw request data.</script> inside HTML strings are a common source of syntax errors. Use heredoc/nowdoc or Blade views for anything non-trivial.php artisan nova:publish and clear compiled views/cache; check that dist/js/card.js exists and is referenced by the service provider.cards response to confirm meta is populated; use Vue devtools to see whether the card component mounted. If the card mounts but is empty, the issue is usually a meta key mismatch rather than the package.view()/component() method—prefer that over forking the package when you need reusable markup. Keep custom views inside resources/views/nova/ and reference them with ->view('nova.my-card').^3.0 in composer.json and note the Nova major in your upgrade docs, since Nova upgrades frequently require matching card releases.How can I help you explore Laravel packages today?