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
Tooltip
A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
Add to library
Component Code
<april:tooltip> <slot:trigger> <april:button variant="outline">Hover</april:button> </slot:trigger> <slot:content> <p>Add to library</p> </slot:content></april:tooltip>
Component Code
<april:tooltip> <slot:trigger> <april:button variant="outline">Hover</april:button> </slot:trigger> <slot:content> <p>Add to library</p> </slot:content></april:tooltip>
Silencing a tooltip
Pass
:disabled="true" to keep a tooltip mounted but quiet. Bind it when a tooltip only helps some of the time, such
as a sidebar label that the reader can already see once the sidebar opens.
<april:tooltip x-effect="tooltipDisabled = sidebar.state !== 'collapsed'"> <slot:trigger>...</slot:trigger> <slot:content>Boarding</slot:content></april:tooltip>
<april:tooltip x-effect="tooltipDisabled = sidebar.state !== 'collapsed'"> <slot:trigger>...</slot:trigger> <slot:content>Boarding</slot:content></april:tooltip>
A silenced tooltip keeps its trigger and its
aria-describedby, so nothing moves on the page when you turn it off.
Publishing Views
Use the following command to publish this view:
php artisan april:publish tooltip
php artisan april:publish tooltip
php artisan april:publish --all
php artisan april:publish --all