Card

You're browsing the documentation for an old version of MoonShine. Consider upgrading your project to MoonShine 2.x.

# Basics

To create cards in the admin panel, use the moonshine::card component

<x-moonshine::card
url="#"
thumbnail="/images/image_1.jpg"
:title="fake()->sentence(3)"
:subtitle="date('d.m.Y')"
:values="['ID' => 1, 'Author' => fake()->name()]"
>
<x-slot:header>
<x-moonshine::badge color="green">new</x-moonshine::badge>
</x-slot:header>
 
{{ fake()->text() }}
 
<x-slot:actions>
<x-moonshine::link href="#">Read more</x-moonshine::link>
</x-slot:actions>
</x-moonshine::card>
Sapiente ut iure labore quia.
new

Sapiente ut iure labore quia.

ID: 1
Author: Miss Dayna Hirthe
Et aspernatur ea iusto. Est iure quaerat doloremque ipsa ducimus. Nam quibusdam exercitationem ad assumenda enim sapiente fugiat itaque. Aut quo ut voluptates qui. Iure aliquam et impedit saepe.

# Overlay view

The overlay view is available for the card

<x-moonshine::card
url="#"
:overlay="true"
thumbnail="/images/image_1.jpg"
:title="fake()->sentence(3)"
:subtitle="date('d.m.Y')"
:values="['ID' => 1, 'Author' => fake()->name()]"
>
<x-slot:header>
<x-moonshine::badge color="green">new</x-moonshine::badge>
</x-slot:header>
 
{{ fake()->text() }}
 
<x-slot:actions>
<x-moonshine::link href="#">Read more</x-moonshine::link>
</x-slot:actions>
</x-moonshine::card>
ID: 1
Author: Ms. Noemie Wilderman
Repellat accusamus nemo et esse aperiam dignissimos a inventore. Nihil et voluptatibus fugiat atque. Qui vero et eum sint sit voluptas sed. Ipsum qui earum ut eos deserunt ratione et.