Block / Content Block - 图1

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
tabletInsetbooleanMakes block inset on tablets, but not on phones
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
<BlockTitle> properties
mediumbooleanMakes block title medium size
largebooleanMakes block title large size

Examples

  1. export default () => (
  2. <Page>
  3. <Navbar title="Content Block"></Navbar>
  4. <p>This paragraph is outside of content block. Not cool, but useful for any custom elements with custom styling.</p>
  5. <Block>
  6. <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>
  7. </Block>
  8. <Block strong>
  9. <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>
  10. </Block>
  11. <BlockTitle>Block title</BlockTitle>
  12. <Block>
  13. <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>
  14. </Block>
  15. <BlockTitle>Another ultra long content block title</BlockTitle>
  16. <Block strong>
  17. <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>
  18. </Block>
  19. <BlockTitle>Inset</BlockTitle>
  20. <Block strong inset>
  21. <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>
  22. </Block>
  23. <BlockTitle>Tablet Inset</BlockTitle>
  24. <Block strong tabletInset>
  25. <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>
  26. </Block>
  27. <BlockTitle>With Header & Footer</BlockTitle>
  28. <Block>
  29. <BlockHeader>Block Header</BlockHeader>
  30. <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>
  31. <BlockFooter>Block Footer</BlockFooter>
  32. </Block>
  33. <BlockHeader>Block Header</BlockHeader>
  34. <Block>
  35. <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>
  36. </Block>
  37. <BlockFooter>Block Footer</BlockFooter>
  38. <Block strong>
  39. <BlockHeader>Block Header</BlockHeader>
  40. <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>
  41. <BlockFooter>Block Footer</BlockFooter>
  42. </Block>
  43. <BlockHeader>Block Header</BlockHeader>
  44. <Block strong>
  45. <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>
  46. </Block>
  47. <BlockFooter>Block Footer</BlockFooter>
  48. <BlockTitle large>Block Title Large</BlockTitle>
  49. <Block strong>
  50. <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>
  51. </Block>
  52. <BlockTitle medium>Block Title Medium</BlockTitle>
  53. <Block strong>
  54. <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>
  55. </Block>
  56. </Page>
  57. );