1.1.3 • Published 5 months ago
directus-extension-user-role-css-injector v1.1.3
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
- Install the extension using a package manager or from the Marketplace:
npm install directus-extension-user-role-css-injector
Restart Directus.
Data attribute gets injected in the body element.
- Add your custom CSS:
body[data-user-id="..."] {
/* custom css */
}
body[data-user-role="..."] {
/* custom css */
}