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 doesn’t render any output. It can be used to create JS Photo Browser instance and control it inside of your Vue component.

    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-photo-browser
    23. type="page"
    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. theme="dark"
    54. back-link-text="Back"
    55. ref="pageDark"
    56. ></f7-photo-browser>
    57. <f7-button raised @click="$refs.pageDark.open()">Page</f7-button>
    58. </f7-col>
    59. </f7-row>
    60. </f7-block>
    61. </f7-page>
    62. </template>
    63. <script>
    64. export default {
    65. data() {
    66. return {
    67. photos: [
    68. {
    69. url: 'img/beach.jpg',
    70. caption: 'Amazing beach in Goa, India',
    71. },
    72. 'http://placekitten.com/1024/1024',
    73. 'img/lock.jpg',
    74. {
    75. url: 'img/monkey.jpg',
    76. caption: 'I met this monkey in Chinese mountains',
    77. },
    78. {
    79. url: 'img/mountains.jpg',
    80. caption: 'Beautiful mountains in Zhangjiajie, China',
    81. },
    82. ],
    83. };
    84. },
    85. }