--- title: "" --- # `` You can use `` component to activate `default` layout on `app.vue` or `error.vue`. ```vue [/app.vue] ``` `` can be used to override `default` layout on `app.vue`, `error.vue` or even page components found in the `/pages` directory. ## `name` prop `` component accepts the `name` prop, which you can pass to use a non-default layout, where `name` can be a static string, reactive reference or a computed property. It **must** match the name of the corresponding layout file in the `/layouts` directory. ### Examples ```vue [pages/index.vue] ``` ::alert{icon=👉} Please note the layout name is normalized to kebab-case, so if your layout file is named `errorLayout.vue`, it will become `error-layout` when passed as a `name` property to ``. :: ```vue [/error.vue] ``` ## Passing Additional Props `NuxtLayout` also accepts any additional props that you may need to pass to the layout. These custom props are then made accessible as attributes. ```vue[pages/some-page.vue]
``` In the above example, the value of `title` will be available using `$attrs.title` in the template or `useAttrs().title` in ` ``` ## Layout and Transition `` renders incoming content via ``, which is then wrapped around Vue’s `` component to activate layout transition. For this to work as expected, it is recommended that `` is **not** the root element of the page component. ```vue [pages/index.vue] ``` ## Accessing a layout's component ref To get the ref of a layout component, access it through `ref.value.layoutRef` ````html ```` ::ReadMore{link="/docs/guide/directory-structure/layouts"} ::