Features

This section contains detailed instructions on how to use AdminJS features.

Features are ready-made extensions for your resources. They extend existing resource options with predefined configuration and merge with your custom actions or properties configurations.

Features should be included in features section of your resource, example:

import { ResourceWithOptions } from 'adminjs';

import User from './user.entity.js';

const UserResource: ResourceWithOptions = {
  resource: User,
  options: {},
  features: [someFeature({ /* feature config */ })],
};

export default UserResource;

The most common use case of features is when you want some specific behaviour or configuration to be shared by multiple resources, for example: you may want to create a feature which logs changes to server's console.

If you'd like to learn how to write your own features, please visit:

pageWriting your own features

Last updated