Overview
When you have multiple inlines on a single model, you can organize them into tabs by setting thetab attribute on each inline class. This creates a cleaner interface and improves the user experience.

Basic Setup
To enable inline tabs, add thetab attribute to your inline class:
admin.py
When
tab=True is set on an inline, it will be displayed in a separate tab instead of being stacked vertically with other inlines.Tab with Custom Label
The tab label is automatically derived from the model’s verbose name, but you can customize it:admin.py
Mixing Tabs and Regular Inlines
You can mix inlines with and without tabs. Inlines withouttab=True will display normally above the tabbed interface:
admin.py
Tab Error Indication
When an inline formset has validation errors, the tab will be highlighted to indicate which tab contains errors:admin.py
Combining with Pagination
Inline tabs work seamlessly with pagination for large datasets:admin.py
Learn more about pagination in Paginated Inlines.
Combining with Sortable Inlines
You can make inline tabs sortable for drag-and-drop ordering:admin.py
Learn more about sortable functionality in Sortable Inlines.
Active Tab Detection
The first tab with validation errors is automatically activated. If there are no errors, the first tab is active by default:admin.py
Best Practices
Keep related content together
Keep related content together
Use descriptive labels
Use descriptive labels
Set clear
verbose_name_plural values on your models so tab labels are meaningful.Limit the number of tabs
Limit the number of tabs
Too many tabs can be overwhelming. Consider grouping related models or using a different organization strategy if you have more than 5-6 tabs.
Combine with collapsible
Combine with collapsible
For complex forms, consider making some inlines collapsible while keeping others in tabs:
Technical Details
When set to
True, the inline will be displayed in a separate tab.unfold/helpers/tab_list.html template and integrates with:
- Error detection via
unfold.templatetags.unfold.tabs_primary_active - Error counting via
unfold.templatetags.unfold.tabs_errors_count
Inline tabs are automatically detected when rendering the change form. No additional configuration is needed beyond setting
tab=True.Related Features
Fieldset Tabs
Create tabs within fieldsets
Model Tabs
Configure navigation tabs for models
Paginated Inlines
Add pagination to your inline tabs
Sortable Inlines
Enable drag-and-drop ordering