Popover Vue Component
- Popover Components
- Popover Properties
- Popover Methods
- Popover Events
- Open And Close Popover
- Access To Popover Instance
- Examples
Popover component is used to manage the presentation of content in a popover. You use popovers to present information temporarily. The popover remains visible until the user taps outside of the popover window or you explicitly dismiss it.
Popover Vue component represents Popover component.
Popover Components
There are following components included:
f7-popover
Popover Properties
Prop | Type | Default | Description |
---|---|---|---|
<f7-popover> properties | |||
opened | boolean | false | Allows to open/close Popover and set its initial state |
target | string object | HTML element or string CSS selector of Popover target element | |
backdrop | boolean | Enables Popover backdrop (dark semi transparent layer behind). By default inherits same app parameter value (true ) | |
backdrop-el | string object | HTML element or string CSS selector of custom backdrop element | |
close-by-backdrop-click | boolean | true | When enabled, popover will be closed on backdrop click. By default inherits same app parameter value |
close-by-outside-click | boolean | true | When enabled, popover will be closed on when click outside of it. By default inherits same app parameter value |
close-on-escape | boolean | false | When enabled, popover sheet will be closed on ESC keyboard key press |
Popover Methods
<f7-popover> methods | |
---|---|
.open(target, animate) | Open popover around target element |
.close(animate) | Close popover |
Popover Events
Event | Description |
---|---|
<f7-popover> events | |
popover:open | Event will be triggered when Popover starts its opening animation |
popover:opened | Event will be triggered after Popover completes its opening animation |
popover:close | Event will be triggered when Popover starts its closing animation |
popover:closed | Event will be triggered after Popover completes its closing animation |
Open And Close Popover
You can control Popover state, open and closing it:
- using Popover API
- by passing
true
orfalse
to itsopened
prop - by clicking on Link or Button with relevant
popover-open
property (to open it) andpopover-close
property to close it
Access To Popover Instance
You can access Popover initialized instance by accessing .f7Popover
component's property.
Examples
<f7-page>
<f7-navbar title="Popover"></f7-navbar>
<f7-toolbar bottom>
<f7-link>Dummy Link</f7-link>
<f7-link popover-open=".popover-menu">Open Popover</f7-link>
</f7-toolbar>
<f7-block>
<p><f7-button raised popover-open=".popover-menu">Open popover on me</f7-button></p>
<p>Mauris fermentum neque et luctus venenatis. Vivamus a sem rhoncus, ornare tellus eu, euismod mauris. In porta turpis at semper convallis. Duis adipiscing leo eu nulla lacinia, quis rhoncus metus condimentum. Etiam nec malesuada nibh. Maecenas quis lacinia nisl, vel posuere dolor. Vestibulum condimentum, nisl ac vulputate egestas, neque enim dignissim elit, rhoncus volutpat magna enim a est. Aenean sit amet ligula neque. Cras suscipit rutrum enim. Nam a odio facilisis, elementum tellus non, <f7-link popover-open=".popover-menu">popover</f7-link> tortor. Pellentesque felis eros, dictum vitae lacinia quis, lobortis vitae ipsum. Cras vehicula bibendum lorem quis imperdiet.</p>
<p>In hac habitasse platea dictumst. Etiam varius, ante vel ornare facilisis, velit massa rutrum dolor, ac porta magna magna lacinia nunc. Curabitur <f7-link popover-open=".popover-menu">popover!</f7-link> cursus laoreet. Aenean vel tempus augue. Pellentesque in imperdiet nibh. Mauris rhoncus nulla id sem suscipit volutpat. Pellentesque ac arcu in nisi viverra pulvinar. Nullam nulla orci, bibendum sed ligula non, ullamcorper iaculis mi. In hac habitasse platea dictumst. Praesent varius at nisl eu luctus. Cras aliquet porta est. Quisque elementum quis dui et consectetur. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sed laoreet purus. Pellentesque eget ante ante.</p>
<p>Duis et ultricies nibh. Sed facilisis turpis urna, ac imperdiet erat venenatis eu. Proin sit amet faucibus tortor, et varius sem. Etiam vitae lacinia neque. Aliquam nisi purus, interdum in arcu sed, ultrices rutrum arcu. Nulla mi turpis, consectetur vel enim quis, facilisis viverra dui. Aliquam quis convallis tortor, quis semper ligula. Morbi ullamcorper <f7-link popover-open=".popover-menu">one more popover</f7-link> massa at accumsan. Etiam purus odio, posuere in ligula vitae, viverra ultricies justo. Vestibulum nec interdum nisi. Aenean ac consectetur velit, non malesuada magna. Sed pharetra vehicula augue, vel venenatis lectus gravida eget. Curabitur lacus tellus, venenatis eu arcu in, interdum auctor nunc. Nunc non metus neque. Suspendisse viverra lectus sed risus aliquet, vel accumsan dolor feugiat.</p>
</f7-block>
<f7-popover class="popover-menu">
<f7-list>
<f7-list-item link="#" popover-close title="Dialog"></f7-list-item>
<f7-list-item link="#" popover-close title="Tabs"></f7-list-item>
<f7-list-item link="#" popover-close title="Side Panels"></f7-list-item>
<f7-list-item link="#" popover-close title="List View"></f7-list-item>
<f7-list-item link="#" popover-close title="Form Inputs"></f7-list-item>
</f7-list>
</f7-popover>
</f7-page>