Card
You're browsing the documentation for an old version of MoonShine. Consider upgrading your project to MoonShine 2.x.
-
Sections
# 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>
new
Deleniti libero et voluptatem nulla nesciunt consectetur veritatis. Ab quibusdam sed et quas sapiente impedit modi. Minima odit est eius odio. Ab perspiciatis quia quibusdam est ea et.
Voluptate atque debitis doloribus.
ID: | 1 |
---|---|
Author: | Mallie Bogan |
# 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
Fugit officia adipisci repellat.
22.01.2025
ID: | 1 |
---|---|
Author: | Eric Spinka |