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>
Consequuntur id dolores.
new

Consequuntur id dolores.

ID: 1
Author: Mr. Morgan Volkman DDS
Eos ratione doloribus ratione distinctio et accusantium ipsam. Fuga pariatur repudiandae rem commodi rerum sit et et. Est blanditiis hic dolorem laboriosam. Voluptatem et error accusantium ut minus.

# 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>
new Occaecati sed et enim.
ID: 1
Author: Dr. Sedrick Grimes
Magnam non tenetur amet architecto facere sapiente aperiam. Ut nemo magni dolorem iusto. Cumque in commodi qui quasi adipisci.