LogoLogo
Join our community
  • AdminJS
  • Contribute
  • Demo
  • Addons Marketplace
  • Installation
    • Getting started
    • Plugins
      • Adonis
      • Express
      • Nest
      • Fastify
      • Hapi
      • Koa
      • Community Plugins
        • FeathersJS
        • AdonisJS
      • Matrix
    • Adapters
      • TypeORM
      • Sequelize
      • Prisma
      • MikroORM
      • Objection
      • SQL
      • Mongoose
      • Community Adapters
        • AdonisJS
    • What's new in v7?
    • Migration Guide v7
  • Basics
    • Resource
    • Action
    • Property
    • Features
      • Relations
      • Upload
      • Logger
      • Import & Export
      • Password
      • Leaflet Maps
      • Writing your own features
    • API
      • List
      • New
      • Search
      • Show
      • Edit
      • Delete
      • Bulk Delete
    • Themes
    • Authentication
      • FirebaseAuthProvider
      • MatrixAuthProvider
  • How to write an addon?
  • UI Customization
    • Writing your own Components
    • Overwriting CSS styles
    • Dashboard customization
    • Changing the form view
    • Storybook
  • Tutorials
    • Role-Based Access Control
    • Internationalization (i18n)
    • Content Management System
    • Custom components library
    • Custom component internationalization
  • FAQ
    • PDF Generator
    • Charts
    • Forgot Password
  • ⚠️Legacy documentation
Powered by GitBook
On this page
  1. Basics

Features

PreviousPropertyNextRelations

Last updated 1 year ago

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:

Writing your own features