--- icon: IconDirectory title: 'layouts' head.title: Layouts directory --- # Layouts directory Nuxt provides a customizable layouts framework you can use throughout your application, ideal for extracting common UI or code patterns into reusable layout components. Page layouts are placed in the `layouts/` directory and will be automatically loaded via asynchronous import when used. If you create a `layouts/default.vue` this will be used for all pages in your app. Other layouts are used by setting a `layout` property as part of your component's options. If you only have a single layout in your application, you can alternatively use [app.vue](/docs/directory-structure/app). ## Example: a custom layout ```bash -| layouts/ ---| custom.vue ``` In your layout files, you'll need to use `` to define where the page content of your layout will be loaded. For example: ```vue ``` Given the example above, you can use a custom layout like this: ```vue ``` ::alert{type=info} Learn more about [defining page meta](/docs/directory-structure/pages#page-metadata). :: ## Example: using with slots You can also take full control (for example, with slots) by using the `` component (which is globally available throughout your application) by setting `layout: false`. ```vue ``` ## Example: changing the layout You can also use a ref or computed property for your layout. ```vue ```