Extension Header
Every component tab should have a fixed header that is positioned at the top of the extension library, independent of the scrollable area in the toolbox. The extension name, image, and any commonly accessed functions should go into the header.
There are two types of extension header, with the choice depending on whether inner tabs are used within the component tab.
A helper class is provided to ease the creation of our standard library headers:
This builder can then be passed to the library like so:
A - Extension Header (mandatory)
- Background colour: Neutral/White-100 (#FFFFFF)
- Border colour: Border/Border 1 (#B3B3B3)
- Width: 312px
- Height: 48px
- Border top weight: 1
- Border bottom weight: 1
B - Extension Icon (optional)
C - Extension Title (mandatory)
- Text colour: Neutral/Grey-86 (#242424)
- Text style: Heading 4
D,E,F - Header Button (optional)
- Max 3 in row
Note that the header buttons can be customized to your extension's needs. These icons are only used as an example.
There is an alternative header style that can be chosen if a Scheme dropdown is required:
G - Scheme Dropdown (mandatory)
H - Header Button
- Max 1 in row
Note that in this style, only one header button is allowed, as the rest of the space has been allocated to the dropdown.
Only 2 header buttons
Only 1 header button
No header button
Only 2 header buttons
Only 1 header button
No header button
The basic header can be extended with tabs (which can be presented as a row of accented tabs or a dropdown).
Tabs are like compartments within a toolbox, each organizing different tools or features relevant to the extension, allowing users to easily switch between them without cluttering the entire extension tab bar.
To utilize tabs, a specialized header builder, TabbedLibraryHeaderBuilder is used instead.
The useDropDownStyle parameter can be set to true to utilize Dropdown Tabs instead of Accent Tabs.
Additionally, in the event that the accent tab row was to exceed a width of 284px, the builder will automatically switch to the dropdown style instead.
Now that we have our specialized header builder, we will demonstrate how to create individual tabs below.
A - Accent Tabs
This accent tab row cannot exceed a width of 284px, and is affected by both the number of tabs and the width of each tab. If this width is exceeded, then the dropdown presentation will be used instead (see below).
B - Dropdown Tabs
The usage of this presentation is encouraged when tab names are long, and will be forced when the width of the accent tab row exceeds 284px.
All margins are the same as with the basic header with no tabs, with only the height being changed. Note that the height of the header is differs slightly depending on whether a accent tabs or dropdown presentation are used.