Photo Browser Vue Component

    Photo Browser is an photo browser component to display collection of photos / images. Photos can be zoomed and panned (optional).

    Photo Browser Vue component represents Framework7’s Photo Browser component.

    There are following components included:

    Photo Browser Properties

    You can pass all parameters in single params property or use separate props for each parameter to specify them via component properties:

    Photo Browser Methods

    You can access Photo Browser initialized instance by accessing .f7PhotoBrowser component’s property.

    Examples

    1. <template>
    2. <f7-page>
    3. <f7-navbar title="Photo Browser"></f7-navbar>
    4. <f7-block>
    5. <p>Photo Browser could be opened in a three ways - as a Standalone component (Popup modification), in Popup, and as separate Page:</p>
    6. <f7-row>
    7. <f7-col>
    8. <f7-photo-browser
    9. :photos="photos"
    10. ref="standalone"
    11. ></f7-photo-browser>
    12. <f7-button raised @click="$refs.standalone.open()">Standalone</f7-button>
    13. </f7-col>
    14. <f7-col>
    15. <f7-photo-browser
    16. :photos="photos"
    17. type="popup"
    18. ref="popup"
    19. ></f7-photo-browser>
    20. <f7-button raised @click="$refs.popup.open()">Popup</f7-button>
    21. </f7-col>
    22. <f7-col>
    23. <f7-photo-browser
    24. back-link-text="Back"
    25. ref="page"
    26. ></f7-photo-browser>
    27. <f7-button raised @click="$refs.page.open()">Page</f7-button>
    28. </f7-col>
    29. </f7-row>
    30. </f7-block>
    31. <f7-block>
    32. <p>Photo Browser suppots 2 default themes - default Light (like in previous examples) and Dark theme. Here is a Dark theme examples:</p>
    33. <f7-row>
    34. <f7-col>
    35. <f7-photo-browser
    36. :photos="photos"
    37. theme="dark"
    38. ref="standaloneDark"
    39. ></f7-photo-browser>
    40. <f7-button raised @click="$refs.standaloneDark.open()">Standalone</f7-button>
    41. </f7-col>
    42. <f7-col>
    43. <f7-photo-browser
    44. :photos="photos"
    45. theme="dark"
    46. type="popup"
    47. ref="popupDark"
    48. ></f7-photo-browser>
    49. <f7-button raised @click="$refs.popupDark.open()">Popup</f7-button>
    50. </f7-col>
    51. <f7-col>
    52. <f7-photo-browser
    53. :photos="photos"
    54. theme="dark"
    55. back-link-text="Back"
    56. ref="pageDark"
    57. ></f7-photo-browser>
    58. <f7-button raised @click="$refs.pageDark.open()">Page</f7-button>
    59. </f7-col>
    60. </f7-row>
    61. </f7-block>
    62. </f7-page>
    63. </template>
    64. <script>
    65. export default {
    66. data() {
    67. return {
    68. photos: [
    69. {
    70. url: 'img/beach.jpg',
    71. caption: 'Amazing beach in Goa, India',
    72. },
    73. 'https://placekitten.com/1024/1024',
    74. 'img/lock.jpg',
    75. {
    76. url: 'img/monkey.jpg',
    77. caption: 'I met this monkey in Chinese mountains',
    78. },
    79. {
    80. url: 'img/mountains.jpg',
    81. caption: 'Beautiful mountains in Zhangjiajie, China',
    82. },
    83. ],
    84. };
    85. },
    86. }

    ← Panel / Side Panels