Tooltip See documentation
Tooltip module is not a standalone one: That means you can't render any html contents whitout attaching a tooltip to an existing module
Attach a tooltip to a button:
Html::button('#', 'Hover me')->tooltip('I am a tooltip')Hover me
Specify the placement of the tooltip:
Html::button('#', 'Hover me')->tooltip('I am a tooltip', 'right')Hover me
Second tooltip's arguement accepts data attributes based options throught as array:
Html::label('Hover me')->tooltip('Hey!', array('placement' => 'bottom', 'animation' => 'false'))Hover me
Popover See the popover reference
Despite tooltips, popover is a standalone module, but you can simply attach it to a existing module.
To attach the popover, set title and contents:
Html::button('#', 'Click me')->popover('title', 'content')Click me
Specify the placement, or setup data attributes based options:
Html::button('#', 'Click me')->popover('title', 'content', array('placement' => 'top')) Html::label('Hover me')->popover('title', 'content', 'hover')Click me Hover me
Modal See the modal reference
Only elements that support
href
attributes can attach modals elementsModal is also a standalone module.
When attaching a modal to a module, the modal will be rendered just after the module in your html page.
If a local href
is set, the modal id attribute will inherit of.
If no local href is set, the modal id
attribute and href
will be created to rely modal with the element.
$modal = Html::modal(true) modal->set(...) ----- Html::button('#modal', 'Open modal')->modal($modal)Open modal
modal
I'm an attached modal