Block Vue Component
Block Vue component represents Block / Content Block element designed (mostly) to add extra formatting and required spacing for text content.
Block Components
There are following components included:
f7-block
- main block elementf7-block-title
- block title. Can be used before Block or List Viewf7-block-header
- extra header element. Can be used both inside and outside of block elementsf7-block-footer
- extra footer element. Can be used both inside and outside of block elements
Block Properties
Prop | Type | Default | Description |
---|---|---|---|
<f7-block> properties | |||
inset | boolean | Makes block inset. inset-ios and inset-md props available for theme specific layout | |
xsmall-inset | boolean | Makes block inset when app width >= 480px. xsmall-inset-ios and xsmall-inset-md props available for theme specific layout | |
small-inset | boolean | Makes block inset when app width >= 568px. small-inset-ios and small-inset-md props available for theme specific layout | |
medium-inset | boolean | Makes block inset when app width >= 768px. medium-inset-ios and medium-inset-md props available for theme specific layout | |
large-inset | boolean | Makes block inset when app width >= 1024px. large-inset-ios and large-inset-md props available for theme specific layout | |
xlarge-inset | boolean | Makes block inset when app width >= 1200px. xlarge-inset-ios and xlarge-inset-md props available for theme specific layout | |
strong | boolean | Adds extra highlighting and padding block content. strong-ios and strong-md props available for theme specific layout | |
outline | boolean | Makes block outline (with border). outline-ios and outline-md props available for theme specific layout | |
accordion-list | boolean | Makes block wrapper for accordion items | |
tabs | boolean | Adds additional "tabs" class to make the block tabs wrapper | |
tab | boolean | Adds additional "tab" class when block should be used as a Tab | |
tab-active | boolean | Adds additional "tab-active" class when block used as a Tab and makes it active tab | |
<f7-block-title> properties | |||
medium | boolean | Makes block title medium size | |
large | boolean | Makes block title large size |
Examples
content-block.vue
<template>
<f7-page>
<f7-navbar title="Content Block"></f7-navbar>
<p>
This paragraph is outside of content block. Not cool, but useful for any custom elements with
custom styling.
</p>
<f7-block-title>Block Title</f7-block-title>
<f7-block>
<p>
Here comes paragraph within content block. Donec et nulla auctor massa pharetra adipiscing
ut sit amet sem. Suspendisse molestie velit vitae mattis tincidunt. Ut sit amet quam mollis,
vulputate turpis vel, sagittis felis.
</p>
</f7-block>
<f7-block-title>Strong Block</f7-block-title>
<f7-block strong>
<p>
Here comes another text block with additional "block-strong" class. Praesent nec imperdiet
diam. Maecenas vel lectus porttitor, consectetur magna nec, viverra sem. Aliquam sed risus
dolor. Morbi tincidunt ut libero id sodales. Integer blandit varius nisi quis consectetur.
</p>
</f7-block>
<f7-block-title>Strong Outline Block</f7-block-title>
<f7-block strong outline>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates itaque autem qui quaerat
vero ducimus praesentium quibusdam veniam error ut alias, numquam iste ea quos maxime
consequatur ullam at a.
</p>
</f7-block>
<f7-block-title>Strong Inset Block</f7-block-title>
<f7-block strong inset>
<p>
Donec et nulla auctor massa pharetra adipiscing ut sit amet sem. Suspendisse molestie velit
vitae mattis tincidunt. Ut sit amet quam mollis, vulputate turpis vel, sagittis felis.
</p>
</f7-block>
<f7-block-title>Strong Inset Outline Block</f7-block-title>
<f7-block strong outline inset>
<p>
Donec et nulla auctor massa pharetra adipiscing ut sit amet sem. Suspendisse molestie velit
vitae mattis tincidunt. Ut sit amet quam mollis, vulputate turpis vel, sagittis felis.
</p>
</f7-block>
<f7-block-title>Tablet Inset</f7-block-title>
<f7-block strong medium-inset>
<p>
Donec et nulla auctor massa pharetra adipiscing ut sit amet sem. Suspendisse molestie velit
vitae mattis tincidunt. Ut sit amet quam mollis, vulputate turpis vel, sagittis felis.
</p>
</f7-block>
<f7-block-title>With Header & Footer</f7-block-title>
<f7-block>
<f7-block-header>Block Header</f7-block-header>
<p>
Here comes paragraph within content block. Donec et nulla auctor massa pharetra adipiscing
ut sit amet sem. Suspendisse molestie velit vitae mattis tincidunt. Ut sit amet quam mollis,
vulputate turpis vel, sagittis felis.
</p>
<f7-block-footer>Block Footer</f7-block-footer>
</f7-block>
<f7-block-header>Block Header</f7-block-header>
<f7-block>
<p>
Here comes paragraph within content block. Donec et nulla auctor massa pharetra adipiscing
ut sit amet sem. Suspendisse molestie velit vitae mattis tincidunt. Ut sit amet quam mollis,
vulputate turpis vel, sagittis felis.
</p>
</f7-block>
<f7-block-footer>Block Footer</f7-block-footer>
<f7-block strong>
<f7-block-header>Block Header</f7-block-header>
<p>
Here comes paragraph within content block. Donec et nulla auctor massa pharetra adipiscing
ut sit amet sem. Suspendisse molestie velit vitae mattis tincidunt. Ut sit amet quam mollis,
vulputate turpis vel, sagittis felis.
</p>
<f7-block-footer>Block Footer</f7-block-footer>
</f7-block>
<f7-block-header>Block Header</f7-block-header>
<f7-block strong>
<p>
Here comes paragraph within content block. Donec et nulla auctor massa pharetra adipiscing
ut sit amet sem. Suspendisse molestie velit vitae mattis tincidunt. Ut sit amet quam mollis,
vulputate turpis vel, sagittis felis.
</p>
</f7-block>
<f7-block-footer>Block Footer</f7-block-footer>
<f7-block-title large>Block Title Large</f7-block-title>
<f7-block strong>
<p>
Donec et nulla auctor massa pharetra adipiscing ut sit amet sem. Suspendisse molestie velit
vitae mattis tincidunt. Ut sit amet quam mollis, vulputate turpis vel, sagittis felis.
</p>
</f7-block>
<f7-block-title medium>Block Title Medium</f7-block-title>
<f7-block strong>
<p>
Donec et nulla auctor massa pharetra adipiscing ut sit amet sem. Suspendisse molestie velit
vitae mattis tincidunt. Ut sit amet quam mollis, vulputate turpis vel, sagittis felis.
</p>
</f7-block>
</f7-page>
</template>
<script>
import {
f7Navbar,
f7Page,
f7BlockTitle,
f7Block,
f7BlockHeader,
f7BlockFooter,
} from 'framework7-vue';
export default {
components: {
f7Navbar,
f7Page,
f7BlockTitle,
f7Block,
f7BlockHeader,
f7BlockFooter,
},
};
</script>