Link Vue Component

Link is main component to create links for navigation, custom actions, switching tabs, open/close panels, etc.

Link Components

There are following components included:

  • f7-link

Link Properties

PropTypeDefaultDescription
<f7-link> properties
no-link-classbooleanRemoves “link” class
tab-linkstring
boolean
Enables tab link and specify CSS selector of the target tab (if specified as a string)
tab-link-activebooleanMakes this tab link active
textstringLink text
badgestring
number
Badge count
badge-colorstringBadge color. One of the default colors
icon-onlybooleanEnable when used in navbar/toolbar with icon only inside
tooltipstringLink tooltip text to show on link hover/press
<f7-link> Smart Select related properties
smart-selectbooleanfalseEnables Smart Select behavior
smart-select-paramsobjectObject with Smart Select Parameters
<f7-link> icon related properties
icon-sizestring
number
Icon size in px
icon-colorstringIcon color. One of the default colors
iconstringCustom icon class
icon-f7stringName of F7 Icons font icon
icon-materialstringName of Material Icons font icon
icon-iosstringIcon to be used in case of iOS theme is used. Consists of icon family and icon name divided by colon, e.g. f7:home
icon-mdstringIcon to be used in case of MD theme is used. Consists of icon family and icon name divided by colon, e.g. material:home
icon-aurorastringIcon to be used in case of Aurora theme is used. Consists of icon family and icon name divided by colon, e.g. material:home
icon-badgestring
number
Adds badge to the icon (intended to be used in Tabbar’s icons)
<f7-link> navigation/router related properties
hrefstring
boolean
#URL of the page to load. In case of boolean href=”false” it won’t add href tag
targetstringValue of link target attribute, e.g. _blank, _self, etc.
viewstringCSS selector of the View to load the page. Or current to load in current view.
externalbooleanEnable to bypass Framework7’s link click handler
backbooleanEnables back navigation link
forcebooleanForce page to load and ignore previous page in history (use together with back prop)
reload-currentbooleanReloads new page instead of the currently active one
reload-previousbooleanReplace the previous page in history with the new one from route
reload-allbooleanLoad new page and remove all previous pages from history and DOM
reload-detailbooleanReload Detail page in Master Detail view
animatebooleanDisables pages animation
transitionstringName of the custom page transition
ignore-cachebooleanIgnores caching
route-tab-idstringRoutable Tab id
route-propsobjectObject with additional props that will be passed to target route component
prevent-routerbooleanfalseIf set, then it won’t be processed by Framework7 router
<f7-link> action related properties
panel-openstring
boolean
CSS selector of panel to open on click. Or can be left or right if there is only left or right panel in DOM.
panel-closestring
boolean
Closes panel on click
panel-togglestring
boolean
CSS selector of panel to toggle on click. Or can be left or right if there is only left or right panel in DOM.
actions-openstring
boolean
CSS selector of the action sheet to open on click
actions-closestring
boolean
CSS selector of the action sheet to close on click. Or boolean property to close currently opened action sheet
popup-openstring
boolean
CSS selector of the popup to open on click
popup-closestring
boolean
CSS selector of the popup to close on click. Or boolean property to close currently opened popup
popover-openstring
boolean
CSS selector of the popover to open on click
popover-closestring
boolean
CSS selector of the popover to close on click. Or boolean property to close currently opened popover
sheet-openstring
boolean
CSS selector of the sheet modal to open on click
sheet-closestring
boolean
CSS selector of the sheet modal to close on click. Or boolean property to close currently opened sheet modal
login-screen-openstring
boolean
CSS selector of the login screen to open on click
login-screen-closestring
boolean
CSS selector of the login screen to close on click. Or boolean property to close currently opened login screen
sortable-enablestring
boolean
CSS selector of the Sortable list to open on click
sortable-disablestring
boolean
CSS selector of the Sortable list to close on click. Or boolean property to close currently opened Sortable list
sortable-togglestring
boolean
CSS selector of the Sortable list to toggle on click. Or boolean property to toggle currently opened/closed Sortable list
searchbar-enablestring
boolean
CSS selector of the Expandable Searchbar to be enabled on click. Or boolean property to enable the first found Searchbar
searchbar-disablestring
boolean
CSS selector of the Expandable Searchbar to be disabled on click. Or boolean property to disable the first found Searchbar
searchbar-togglestring
boolean
CSS selector of the Expandable Searchbar to toggle on click. Or boolean property to toggle the first found Searchbar
searchbar-clearstring
boolean
CSS selector of the Expandable Searchbar to clear on click. Or boolean property to clear the first found Searchbar
card-openstring
boolean
CSS selector of the expandable card to open on click. Or boolean to open first found expandable card
card-closestring
boolean
CSS selector of the expandable card to close on click. Or boolean property to close currently opened expandable card
card-prevent-openbooleanClick on element with this prop won’t open its parent expandable card
menu-closebooleanCloses Menu dropdown on click

Link Events

EventDescription
<f7-link> events
clickEvent will be triggered after click on a link

Examples

Navigation Link

  1. <f7-link href="/about/">About</f7-link>

Back Navigation Link

  1. <f7-link back>Back</f7-link>

With Router Parameters

  1. <f7-link href="/about/" :animate="false" :ignore-cache="true">About</f7-link>

External Link

  1. <f7-link href="http://google.com" external>Google</f7-link>

Tab Link

  1. <!-- Tabs -->
  2. <f7-tabs>
  3. <f7-tab id="tab-1" tab-active>Tab 1</f7-tab>
  4. <f7-tab id="tab-1">Tab 2</f7-tab>
  5. </f7-tabs>
  6. <!-- Switch Between Tabs -->
  7. <f7-link tab-link="#tab-1" tab-link-active>Show Tab 1</f7-link>
  8. <f7-link tab-link="#tab-2">Show Tab 2</f7-link>

Routable Tabs

  1. <!-- Tabs -->
  2. <f7-tabs>
  3. <f7-tab id="tab-1"></f7-tab>
  4. <f7-tab id="tab-2"></f7-tab>
  5. </f7-tabs>
  6. <!-- Switch Between Tabs -->
  7. <f7-link tab-link route-tab-id="tab-1" href="/tabs/">Show Tab 1</f7-link>
  8. <f7-link tab-link route-tab-id="tab-2" href="/tabs/tab-2/">Show Tab 2</f7-link>

Open And Close Panel

  1. <f7-link panel-open="left">Open Left Panel</f7-link>
  2. <f7-link panel-close>Close Panel</f7-link>

Open and Close Popup

  1. <f7-link popup-open="#my-popup">Open Popup</f7-link>
  2. <f7-link popup-close="#my-popup">Close Popup</f7-link>

With Icon & Color

  1. <f7-link icon-f7="home" text="Home" color="red"></f7-link>

← Inputs / Form Inputs

List View →