javierms / subadmin_toolbar
A responsive, customizable administration toolbar for secondary roles with modern visual drag-and-drop builder, granular role permissions, and decoupled icon packages.
Package info
github.com/Javier-Macia/subadmin_toolbar
Type:drupal-module
pkg:composer/javierms/subadmin_toolbar
Requires
- drupal/core: ^10.3 || ^11 || ^12
Requires (Dev)
None
Suggests
- javierms/native_fontawesome: Serve Font Awesome 6 icons 100% locally without external CDN requests.
- javierms/native_material: Serve Google Material Symbols and Material Icons 100% locally without external CDN requests.
- javierms/subroles: Restrict toolbar links and widgets to users with specific subroles (enable subadmin_toolbar_subroles).
Provides
None
Conflicts
None
Replaces
None
README
A sleek, responsive, and customizable administration toolbar designed specifically for secondary roles (subadmins, editors, managers) in Drupal 10 & 11.
It provides a clean, distraction-free horizontal top toolbar with nested dropdowns, customized branding, role-based item access, and an intuitive visual drag-and-drop hierarchy builder.
Key Features
-
Visual Drag & Drop Builder: Easily reorder, nest, and configure links and dropdown categories in real-time.
-
Granular Role Permissions: Restrict each link or category to specific roles with a single click.
-
Decoupled Icon Packages:
- Google Material Symbols & Icons: Served out-of-the-box.
- Font Awesome 6: Optional, toggleable from general settings.
- Zero External Dependencies / Privacy-First: Ready to be paired with
native_materialandnative_fontawesometo serve all fonts locally (100% GDPR compliant).
-
Submodules Included:
subadmin_toolbar_local_material_icons: Automatically switches the toolbar from Google Fonts CDN to local fonts ifnative_materialis installed.subadmin_toolbar_local_fontawesome: Automatically switches the toolbar from Cloudflare CDN to local fonts ifnative_fontawesomeis installed.
-
Brand Customization: Custom logo/icon upload, accent colors, and custom brand link.
subadmin_toolbar_subroles: if you use thesubrolesmodule, links and widgets get an "Allowed subroles" setting. An item is visible to users with one of its roles or one of its subroles (a subrole only counts while the user has its parent role). If an item has subroles and no roles, only the users with those subroles see it.
Requirements
- Drupal 10.3+, 11 or 12.
Installation
Using Composer:
composer require javierms/subadmin_toolbar drush en subadmin_toolbar -y
To serve icon fonts 100% locally from your server without CDNs:
composer require javierms/native_material drush en subadmin_toolbar_local_material_icons -y
Configuration
Navigate to:
- General Settings & Appearance:
/admin/config/user-interface/subadmin-toolbar- Set toolbar brand title, logo/icon, accent color, and enable/disable Font Awesome.
- Links & Hierarchy Builder:
/admin/config/user-interface/subadmin-toolbar/links- Drag the handle of a row to reorder it; move sideways while dragging to change its level. Branches can be collapsed, the list can be filtered, and with the keyboard you can focus a handle and use the arrow keys to move or indent a link.
- Each row has its own icon, URL and role restrictions.
- Widgets:
/admin/config/user-interface/subadmin-toolbar/widgets- Place any block as a widget on the right end of the toolbar.
Finally, grant the Access the Subadmin Toolbar permission to the roles that should see it.
Link URLs must start with / (internal path) or be a valid external URL; unsafe protocols such as javascript: are rejected.
License
- GNU General Public License v2.0 or later (GPL-2.0-or-later).
Extending
Other modules can add their own settings to links and widgets and take part in their visibility. See subadmin_toolbar.api.php for hook_subadmin_toolbar_item_configuration_alter(), hook_subadmin_toolbar_item_values_alter() and hook_subadmin_toolbar_item_visibility_alter(); subadmin_toolbar_subroles is a working example.