SurfaceBootstrap.Modal (surface_bootstrap v0.2.5)
The Bootstrap modal, with various configuration options.
This component relies on Bootstrap Native and requires to follow the instructions in the Readme file to use.
Use the public API to show / hide the modal programmatically.
The hook takes care of interop with classes that the javascript code modify to show/hide the modal.
Using Modal.show("component_id")
or Modal.hide("component_id")
essentially delegates down
to the javascript implementation to allow for animation, scroll overflow handling on the <body>
element etc.
## Properties
* **id** *:string, required: true* - The id of the live component (required by LiveView for stateful components).
.
* **fade** *:boolean, default: true* - Should modal fade in/out? Defaults true.
* **backdrop** *:boolean, default: true* - Have backdrop / darkened background? Defaults true.
* **static_backdrop** *:boolean* - Should have static backdrop? As in clicking background does not close modal..
* **scrollable** *:boolean* - Scrollable content?.
* **use_grid** *:boolean* - Use grid? If true will replace modal-content class with container-fluid and let you use row and col classes to align content.
* **vertically_centered** *:boolean* - Center vertically?.
* **show_close_button** *:boolean, default: true* - Show close button? Defaults to true.
* **header** *:string* - Header text.
## Slots
* **footer** - Footer content, use via Modal.Footer.
* **default, required: true** - Default slot.
Link to this section Summary
Functions
Callback implementation for Phoenix.LiveComponent.handle_event/3
.
Callback implementation for Phoenix.LiveComponent.mount/1
.
Callback implementation for Phoenix.LiveComponent.render/1
.
Callback implementation for Phoenix.LiveComponent.update/2
.
Link to this section Functions
handle_event(binary, params, socket)
Callback implementation for Phoenix.LiveComponent.handle_event/3
.
hide(id)
mount(socket)
Callback implementation for Phoenix.LiveComponent.mount/1
.
render(assigns)
Callback implementation for Phoenix.LiveComponent.render/1
.
show(id)
update(assigns, socket)
Callback implementation for Phoenix.LiveComponent.update/2
.