View Source SaladUI.Popover (SaladUI v0.13.1)

Implement Popover component

Usage

<.popover>
  <.popover_trigger target="my-id">
    <.button variant="link">
      @salad_ui
    </.button>
  </.popover_trigger>
  <.popover_content id="my-id" side="left">
     Hover card content
  </.popover_content>
</.popover>

Summary

Functions

Render popover wrapper

Render popover content

Render popover trigger

Functions

Render popover wrapper

Attributes

  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
Link to this function

popover_content(assigns)

View Source

Render popover content

Attributes

  • class (:string) - Defaults to nil.
  • side (:string) - Defaults to "top".
  • align (:string) - Defaults to "center".
  • open (:boolean) - Defaults to false.
  • Global attributes are accepted.

Slots

  • inner_block (required)
Link to this function

popover_trigger(assigns)

View Source

Render popover trigger

Attributes

  • class (:string) - Defaults to nil.
  • target (:string) (required) - The id of target element to show popover.
  • Global attributes are accepted.

Slots

  • inner_block (required)