1.1.3 • Published 5 months ago

directus-extension-user-role-css-injector v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

User Role CSS Injector

Customize Directus UI with Dynamic User and Role Data Attributes

This hook (forked from directus-extensions) injects the current user ID and role in the body element of the Data Studio. This is useful when you want to apply custom CSS to a specific user or role.

Usage

  1. Install the extension using a package manager or from the Marketplace:
npm install directus-extension-user-role-css-injector
  1. Restart Directus.

  2. Data attribute gets injected in the body element.

Screenshot 1

  1. Add your custom CSS:
body[data-user-id="..."] {
  /* custom css */
}

body[data-user-role="..."] {
  /* custom css */
}
1.1.3

5 months ago

1.1.2

5 months ago

1.1.1

5 months ago

1.1.0

5 months ago

1.0.0

5 months ago