View Source ZoonkWeb.Components.Banner (Zoonk v0.2.0-alpha)

Banner components.

Link to this section Summary

Functions

Renders a banner.

Link to this section Functions

Renders a banner.

examples

Examples

<.banner title="My title" icon="tabler-chevrons-up">
  <.section
    title="My section"
    icon="tabler-chevrons-down"
    entries={["My entry"]}
  />
</.banner>

attributes

Attributes

  • title (:string) (required) - Title displayed at the top of the banner.
  • icon (:string) (required) - Icon displayed next to the title.
  • open (:boolean) - Whether the banner is open or not when it first renders. This component uses the details HTML element, which is a collapsible element. So, we don't need to worry about manually opening and closing the banner. Defaults to false.

slots

Slots

  • section - Accepts attributes:
    • title (:string) (required) - Title displayed at the top of the section.
    • icon (:string) (required) - Icon displayed next to the title.
    • entries (:list) - List of entries to display.