Components

Body

The Body component is used to create a body block in MoonShine.

You can create a Body using the static method make() of the Body class.

make(iterable $components = [])
make(iterable $components = [])

$components - an array of components that are placed in the header.

namespace App\MoonShine\Layouts;use MoonShine\UI\Components\Layout\Body;final class MoonShineLayout extends AppLayout{ public function build(): Layout { return Layout::make([ // ... Body::make([]) // ... ]); }}
namespace App\MoonShine\Layouts;
 
use MoonShine\UI\Components\Layout\Body;
 
final class MoonShineLayout extends AppLayout
{
public function build(): Layout
{
return Layout::make([
// ...
 
Body::make([])
 
// ...
]);
}
}
Any content
<x-moonshine::layout.body>
Any content
</x-moonshine::layout.body>