The`components/`directory is where you put all your Vue components which can then be imported inside your pages or other components ([learn more](https://v3.vuejs.org/guide/component-basics.html)).
Nuxt automatically imports any components in your `components/` directory (along with components that are registered by any modules you may be using).
```bash
| components/
--| TheHeader.vue
--| TheFooter.vue
```
```html{}[layouts/default.vue]
<template>
<div>
<TheHeader/>
<Nuxt/>
<TheFooter/>
</div>
</template>
```
## Component Names
If you have components in nested directories such as:
```bash
| components/
--| base/
----| foo/
------| Button.vue
```
The component name will be based on its own path directory and filename, with duplicate segments being removed. Therefore, the component will be:
```html
<BaseFooButton/>
```
::alert
For clarity, it is recommend that the component file name matches its name. (So, in the example above, you could rename `Button.vue` to be `BaseFooButton.vue`.)
::
## Dynamic Imports
To dynamically import a component (also known as lazy-loading a component) all you need to do is add the `Lazy` prefix to the component name.
```html{}[layouts/default.vue]
<template>
<div>
<TheHeader/>
<Nuxt/>
<LazyTheFooter/>
</div>
</template>
```
This is particularly useful if the component is not always needed. By using the `Lazy` prefix you can delay loading the component code until the right moment, which can be helpful for optimizing your JavaScript bundle size.