php artisan aura:add center
Copies the component source into resources/views/components/aura/. Run php artisan aura:init first if you haven't already. See the CLI guide for all options.
composer require bluestarsystem/aura-ui
php artisan aura:install
Full installation instructions in the Installation guide.
Overview
<x-aura::center> puts its child in the middle. It is most useful for the states that have no layout of their own: an empty result set, a spinner, a "not found" panel.
Basic Usage
Loading
<x-aura::center min-height="8rem" class="rounded border border-dashed border-aura-surface-300">
<x-aura::spinner />
</x-aura::center><x-aura::center min-height="60vh">
<x-aura::empty-state title="No orders yet" />
</x-aura::center>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
axis |
string |
'both' |
both, horizontal, vertical. |
min-height |
string|null |
null |
Any CSS length, e.g. 60vh. Vertical centring needs a height to centre within. |
Notes
Centring vertically does nothing unless the container has a height — that is what min-height is for.