directus-extension-flat-tabs-interface
v1.0.6
Published
A tab group interface for Directus
Maintainers
Readme
Directus Flat Tabs Interface 
A tab group interface for Directus.
Features
- Flexible Alignment: Choose from
Left,Right,Center,Between, orStretchalignment for tab positioning - Raw Group Support: Works with Directus raw groups to create tabbed interfaces
Installation
Install the extension from the Directus Marketplace. See the Official Guide for more information.
Or if you prefer to install manually:
npm install directus-extension-flat-tabs-interfaceUsage
Creating a Tab Group
- Create a Group Field: In your Directus collection, create a new field with the "Flat Tabs" type. Alternatively, you can use the "Group" type and select "Flat Tabs" as the interface.
- Configure Alignment: Set the tab alignment option (left, right, center, or cover)
- Add Raw Groups: Add "Raw Group" fields as children of your Flat Tabs field - each raw group field will become a tab
- Add Fields to Tabs: Add your desired fields as children of each raw group field
Example Structure
My Collection
├── Tab Group (Group field with "Flat Tabs" interface)
│ ├── Tab 1 (Raw Group)
│ │ ├── Title (Input)
│ │ ├── Description (Textarea)
│ │ └── Image (File)
│ ├── Tab 2 (Raw Group)
│ │ ├── Settings (JSON)
│ │ └── Options (Checkboxes)
│ └── Tab 3 (Raw Group)
│ ├── Content (WYSIWYG)Configuration Options
Align Tabs: Controls the horizontal alignment of the tab list
Left: Tabs aligned to the left (default)Right: Tabs aligned to the rightCenter: Tabs centeredBetween: Tabs aligned to the left and rightStretch: Tabs stretched to fill the full width
Development
Setup
Load Extension volume in your project and clone the repository to it
Install dependencies:
cd extensions/directus-extension-flat-tabs-interface
npm install- Build the extension with auto rebuild on changes:
npm run devMake sure you've set EXTENSIONS_AUTO_RELOAD in your .env file.
You might need to restart your Directus instance for the extension to be loaded.
Building
npm run buildHow It Works
This extension works by:
- Processing Raw Groups: The interface looks for children fields with the "group-raw" interface type
- Creating Tabs: Each raw group field becomes a tab in the interface
- Rendering Fields: Fields within each raw group are rendered
