{{ name }} - Collection: {{ props.collection }}
```
The props you can use in an layout are:
- `collection` — The current collection's name.
- `selection` (sync) - Any currently selected items.
- `layout-options` (sync) - The user's current saved layout options.
- `layout-query` (sync) - The user's layout query parameters. (eg: sort, limit, etc)
- `filters` (sync) - The user's currently active filters.
- `search-query` (sync) - The user's current search query.
## 2. Install Dependencies and Configure the Buildchain
Set up a package.json file by running:
```bash
npm init -y
```
To be read by the Admin App, your custom layouts's Vue component must first be bundled into a single `index.js` file. We
recommend bundling your code using Rollup. To install this and the other development dependencies, run this command:
```bash
npm i -D rollup @rollup/plugin-node-resolve @rollup/plugin-commonjs rollup-plugin-terser rollup-plugin-vue @vue/compiler-sfc
```
You can then use the following Rollup configuration within `rollup.config.js`:
```js
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import { terser } from 'rollup-plugin-terser';
import vue from 'rollup-plugin-vue';
export default {
input: 'src/index.js',
output: {
format: 'es',
file: 'dist/index.js',
},
external: ['vue', '@directus/extension-sdk'],
plugins: [vue(), nodeResolve(), commonjs(), terser()],
};
```
::: tip Building multiple extensions
You can export an array of build configurations, so you can bundle (or even watch) multiple extensions at the same time.
See the [Rollup configuration file documentation](https://rollupjs.org/guide/en/#configuration-files) for more info.
:::
## 3. Develop Your Custom Layout
The layout itself is simply a Vue component, which provides an blank canvas for creating anything you need.
## 4. Build and Deploy
To build the layout for use within Directus, run:
```bash
npx rollup -c
```
Finally, move the output from your layout's `dist` folder into your project's `/extensions/layouts/my-custom-layout`
folder. Keep in mind that the extensions directory is configurable within your env file, and may be located elsewhere.