# Plugin Menu library
```js
// ...
import PluginLeftMenu from 'components/PluginLeftMenu';
// ...
const Foo = props => {
const sections = [
{
name: 'section 1',
items: [
{ icon: 'fa-caret-square-o-right', name: 'link 1' },
{ icon: 'fa-caret-square-o-right', name: 'link 2' },
],
},
];
return (
);
};
export default Foo;
// ...
```
## Usage
| Property | Type | Required | Description |
| :----------------- | :------- | :------- | :------------------------------------------------------------------------------------------- |
| `addCustomSection` | function | no | Allows to add another section after the initial one. |
| `basePath` | string | yes | For example the basePath of the route '/plugins/my-plugin/foo/bar' is 'my-plugin/categories' |
| `renderCustomLink` | function | no | Allows to override the design and the behavior of a link |
| `sections` | array | yes | Sections of the component menu |
## Example
```js
// ...
import PluginLeftMenu from 'components/PluginLeftMenu';
// ...
const addCustomSection = sectionStyles => (
// You have access to the section styles
);
const renderAddLink = (props, customLinkStyles) => (
);
const renderCustomLink = (props, linkStyles) => {
if (props.link.name === 'bar') return this.renderAddLink(props, linkStyles);
return (
{props.link.name}
);
};
const Foo = props => {
const sections = [
{
name: 'section 1',
items: [
{ icon: 'fa-caret-square-o-right', name: 'link 1' },
{ icon: 'fa-caret-square-o-right', name: 'link 2' },
],
},
];
return (
);
};
// ...
export default Foo;
```