Tabs provide organisation of content separated within the same context.
Related content can be separated into clearly labelled sections.
|A||Icon||This is the icon inside the tab. This should relate to the label text. The specification table has a list of options.|
|B||Heading||Use 1 or 2 words to inform the user of information found within each panel below.|
|C||Selected Tab||This is the visual state of a selected tab. Used to show the user which content is visible below.|
|D||Panel||This is the area in which the content for each |
ns-tab will be displayed.
|💚 Do's||💔 Don'ts|
|Always add heading text||Add an icon to one tab and not to the other tabs|
|Add more than 2 words to the heading|
|Add different types of icons (solid, outline, functional)|
|Use at least two tabs||Use an excessive amount of tabs|
|Be mindful of the extra page weight||Use more than two words for your tab label|
Considerations of best practice
- It is advisable to use tabs alongside other components to avoid building a page that consists only of tabs.
- If you see that the tabs are bleeding over the edge of the page in Polo or Rugby, and you have followed the guidance on not using more than two words on the tab label, then you probably have too many tabs.
- Consider breaking out some of your content and make sure the content is all relevant to that page.
- Related tab and panel slots should be put together in order when adding the content.
A close relationship exists between
ns-tabs a number of
ns-panel pairs exist. Each of these pairs provide a tab to select and a panel to place a layout and related content.
Specification for Individual Tab
|Please see the documentation for ns-icon||Optional icon to add to the tab.|
|Sends a event when tab is selected.|
Specification for Tabs
|Number relates to the order of the tabs|
|Fires an event when the tab has been changed.|
- Multiple tab slots should be added to add multiple tabs. There should be the same amount of tab slots as panel slots.
- Multiple panel slots should be added to add multiple panels. There should be the same amount of panel slots as tab slots.
You can change the branded look and feel of the ns-tabs by modifying these options in the design tokens.
Read more about design tokens in our getting started guide.
- Do you have insights or concerns to share? You can raise an issue via Github bugs.
- See all the issues already raised via Github issues.
💩 🎉 🦄 You can also contact the team on Slack on the