App Svelte Component

App Svelte 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:

  • App

App Properties

Prop Type Default Description
params object Object with Framework7 parameters
routes array Array with default routes for all views. Same as params.routes so you can use this one if you feel more comfortable with such approach
id string App element ID attribute

Examples

Passing all parameters in params prop

1. <App params={f7params}>
2. ...
3. </App>
4. <script>
5. import { App } from 'framework7-svelte';
6. import AboutPage from './about.svelte';
7. import ServicesPage from './services.svelte';

9. const f7params = {
10. name: 'My App',
11. id: 'com.myapp.test',
12. // routes
13. routes: [
14. {
15. path: '/about/',
16. component: AboutPage,
17. },
18. {
19. path: '/services/',
20. component: ServicesPage,
21. },
22. ],
23. // ... other params
24. }
25. </script>

Passing routes in separate prop:

1. <App params={f7params} routes={routes}>
2. ...
3. </App>
4. <script>
5. import { App } from 'framework7-svelte';
6. import routes from './routes';

8. const f7params = {
9. name: 'My App',
10. id: 'com.myapp.test',
11. // ... other params
12. };
13. </script>

← Color Properties

Accordion →