View Source Phoenix.WebComponent.TopAppBar (Phoenix.WebComponent v1.1.1)

Conveniences for create top app bar.

Link to this section Summary

Functions

Generates a top app bar.

Link to this section Functions

Link to this function

wc_top_app_bar(opts, list)

View Source

Generates a top app bar.

Examples

wc_link("hello", to: "/world")
#=> <a href="/world"><mwc-button>hello</mwc-button></a>

Options

Slots

NameDescription
---------------
actionItemsA number of <mwc-icon-button> elements to use for action icons on the right side. NOTE: If using with mwc-drawer, please read note under Standard drawer example.
navigationIconOne <mwc-icon-button> element to use for the left icon.
titleA <div> or <span> that will be used as the title text.
defaultScrollable content to display under the bar. This may be the entire application.

Properties/Attributes

NameTypeDefaultDescription
--------------------------
centerTitlebooleanfalseCenters the title horizontally. Only meant to be used with 0 or 1 actionItems.
densebooleanfalseMakes the bar a little smaller for higher density applications.
prominentbooleanfalseMakes the bar much taller, can be combined with dense.

| scrollTarget | HTMLElement | Window | window | Element used to listen for scroll events.