---
title: Plugin options
project: Pluginable
version: 0.0.1
section: reference
language: en
license: MIT
url: https://totaljs.es/docs/pluginable/0-0-1/reference/plugin-options/
updated: 2026-11-19T07:46:16.797Z
---

# Plugin options

> Every option that a plugin can set in its index.js.

A plugin describes itself with `exports.<option>` lines in its `index.js`. This is the `index.js` of the sample **Products** plugin:

```js
exports.icon = 'ti ti-box';
exports.name = '@(Products)';
exports.position = 1;
exports.permissions = [{ id: 'products', name: 'Products' }];
exports.visible = user => user.sa || user.permissions.includes('products');
exports.routes = [
	{ url: '/products/{id}/', html: 'detail' }
];

exports.config = [
	{ id: 'city', name: 'City', value: 23 }
];

exports.install = function() {
	ROUTE('+API   ?   -products    --> Products/list');
};
```

## Options

| Option | What it does |
|---|---|
| `name` | Name in the menu, on the home tile and as the group title in Settings. `@(...)` marks the text for translation. |
| `icon` | Icon in the menu and on the home tile, a Total.js icon class such as `ti ti-box`. |
| `position` | Order in the menu and on the home screen. Lower numbers come first. |
| `permissions` | Permissions that the plugin offers to [OpenPlatform](../../guides/openplatform/), as a list of `{ id, name }`. |
| `visible` | A function that gets the signed-in user and returns `true` when the user may see the plugin. The samples return `true` for the admin account (`user.sa`) and for users with the plugin permission. |
| `hidden` | `true` keeps the plugin out of the menu and the home screen. See [Remove a plugin](../../recipes/remove-plugin/). |
| `routes` | Extra screens, as a list of `{ url, html }`. See [Add a detail page](../../recipes/add-detail-page/). |
| `config` | Settings shown in Settings, as a list of `{ id, name, value }`. See [Add plugin settings](../../recipes/add-plugin-settings/). |
| `import` | An HTML file in `public` that is loaded into every page of the admin. The `admin` plugin uses it for the account button. |
| `install` | A function that runs on start. Put the `ROUTE` lines of the plugin here. |

## ROUTE lines for actions

A line such as `ROUTE('+API   ?   -products    --> Products/list');` makes the action `Products/list` available to the screens under the name `products`:

- `+` means only signed-in users can call it.
- `?` stands for the admin address, `/admin/`.
- `-products` is a call without data; `+products` sends data to the action, as in `+settings_save`.
- After `-->` comes the name of the action in `schemas`.

A screen calls it with `exports.tapi('products', ...)`, and a script with [a token](../../recipes/api-token/).
