App Vue Component

App Vue component is the main Framework7 app component where all the Framework7 core initialization happens and where you pass all main Framework7 parameters.

App Components

There are following components included:

  • f7-app

App Properties

PropTypeDefaultDescription
paramsobjectObject with Framework7 parameters
routesarrayArray with default routes for all views. Same as params.routes so you can use this one if you feel more comfortable with such approach
idstringApp element ID attribute

Examples

Passing all parameters in params prop

  1. <template>
  2. <f7-app :params="f7params">
  3. <!-- ... -->
  4. </f7-app>
  5. </template>
  6. <script>
  7. import AboutPage from './about.vue';
  8. import ServicesPage from './services.vue';
  9. export default {
  10. data() {
  11. return {
  12. f7params: {
  13. name: 'My App',
  14. id: 'com.myapp.test',
  15. // routes
  16. routes: [
  17. {
  18. path: '/about/',
  19. component: AboutPage,
  20. },
  21. {
  22. path: '/services/',
  23. component: ServicesPage,
  24. },
  25. ],
  26. // ... other params
  27. }
  28. }
  29. }
  30. }
  31. </script>

Passing routes in separate prop:

  1. <template>
  2. <f7-app :params="f7params" :routes="routes">
  3. <!-- ... -->
  4. </f7-app>
  5. </template>
  6. <script>
  7. import routes from './routes';
  8. export default {
  9. data() {
  10. return {
  11. f7params: {
  12. name: 'My App',
  13. id: 'com.myapp.test',
  14. // ... other params
  15. },
  16. // routes
  17. routes,
  18. }
  19. }
  20. }
  21. </script>

← Color Properties

Accordion →