Block React Component

Block React 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:

  • Block / F7Block - main block element
  • BlockTitle / F7BlockTitle - block title. Can be used before Block or List View
  • BlockHeader / F7BlockHeader - extra header element. Can be used both inside and outside of block elements
  • BlockFooter / F7BlockFooter - extra footer element. Can be used both inside and outside of block elements

Block Properties

PropTypeDefaultDescription
<Block> properties
insetbooleanMakes block inset
xsmallInsetbooleanMakes block inset when app width >= 480px
smallInsetbooleanMakes block inset when app width >= 568px
mediumInsetbooleanMakes block inset when app width >= 768px
largeInsetbooleanMakes block inset when app width >= 1024px
xlargeInsetbooleanMakes block inset when app width >= 1200px
strongbooleanAdds extra highlighting and padding block content
accordionListbooleanMakes block wrapper for accordion items
tabsbooleanAdds additional "tabs" class to make the block tabs wrapper
tabbooleanAdds additional "tab" class when block should be used as a Tab
tabActivebooleanAdds additional "tab-active" class when block used as a Tab and makes it active tab
noHairlinesbooleanRemoves outer hairlines
noHairlinesMdbooleanRemoves outer hairlines for MD theme
noHairlinesIosbooleanRemoves outer hairlines for iOS theme
noHairlinesAurorabooleanRemoves outer hairlines for Aurora theme
<BlockTitle> properties
mediumbooleanMakes block title medium size
largebooleanMakes block title large size

Examples

export default () => (
  <Page>
    <Navbar title="Content Block"></Navbar>
    <p>This paragraph is outside of content block. Not cool, but useful for any custom elements with custom styling.</p>

    <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>
    </Block>

    <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>
    </Block>

    <BlockTitle>Block title</BlockTitle>
    <Block>
      <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>
    </Block>

    <BlockTitle>Another ultra long content block title</BlockTitle>
    <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>
    </Block>

    <BlockTitle>Inset</BlockTitle>
    <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>
    </Block>

    <BlockTitle>Tablet Inset</BlockTitle>
    <Block strong mediumInset>
      <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>
    </Block>

    <BlockTitle>With Header & Footer</BlockTitle>
    <Block>
      <BlockHeader>Block Header</BlockHeader>
      <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>
      <BlockFooter>Block Footer</BlockFooter>
    </Block>

    <BlockHeader>Block Header</BlockHeader>
    <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>
    </Block>
    <BlockFooter>Block Footer</BlockFooter>

    <Block strong>
      <BlockHeader>Block Header</BlockHeader>
      <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>
      <BlockFooter>Block Footer</BlockFooter>
    </Block>

    <BlockHeader>Block Header</BlockHeader>
    <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>
    </Block>
    <BlockFooter>Block Footer</BlockFooter>

    <BlockTitle large>Block Title Large</BlockTitle>
    <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>
    </Block>

    <BlockTitle medium>Block Title Medium</BlockTitle>
    <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>
    </Block>
  </Page>
);