Getting Started
Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Banner
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Command
- Collapsible
- Combobox
- Context Menu
- Data Table
- Date Picker
- Dialog
- Dropdown Menu
- Editor
- Input
- Input Group
- Label
- Loading Spinner
- Native Select
- Popover
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Steps
- Switch
- Tabs
- Textarea
- Tooltip
Patterns
Banner
Displays a temporary message at the top or bottom of an application.
April UI 1.0 is ready to use.
A small message can stay out of the way.
Component Code
<div class="relative w-full overflow-hidden rounded-md border bg-muted/20"> <april:banner position="none" display-after="0" dismissable> <x-slot:body> <div class="flex flex-col items-start gap-1 text-sm sm:flex-row sm:items-center sm:justify-between sm:gap-4"> <span>April UI 1.0 is ready to use.</span> <span class="text-muted-foreground">A small message can stay out of the way.</span> </div> </x-slot:body> </april:banner></div>
Component Code
<div class="relative w-full overflow-hidden rounded-md border bg-muted/20"> <april:banner position="none" display-after="0" dismissable> <x-slot:body> <div class="flex flex-col items-start gap-1 text-sm sm:flex-row sm:items-center sm:justify-between sm:gap-4"> <span>April UI 1.0 is ready to use.</span> <span class="text-muted-foreground">A small message can stay out of the way.</span> </div> </x-slot:body> </april:banner></div>
The banner is hidden on first render, then displays after
display-after milliseconds. Use the
body slot for the message and add
dismissable when the user should be able to close it.
<april:banner position="top" display-after="500" dismissable> <x-slot:body> Your trial ends in three days. </x-slot:body></april:banner>
<april:banner position="top" display-after="500" dismissable> <x-slot:body> Your trial ends in three days. </x-slot:body></april:banner>
Set
position="bottom" to anchor the banner to the bottom of the viewport. Set
position="none" when the banner belongs inside a contained layout.
Publishing Views
Use the following command to publish this view:
php artisan april:publish banner
php artisan april:publish banner
php artisan april:publish --all
php artisan april:publish --all