
For this post, we’ll show you two guitar tabs as examples, but keep in mind that the same principles apply to reading bass tabs (you just have fewer strings to worry about!). There are a few basic components to tabs, which we’ll cover here. If you’re familiar with guitar chord charts, they are really similar. Tabs make it quick and easy to learn songs by telling you which strings to pluck and which frets to place your fingers on. You can use HTML or, if you’re using Nunjucks or the GOV.UK Prototype Kit, you can use the Nunjucks macro.Tabs, short for tablature, are shorthand charts that document music for stringed, fretted instruments like guitar and bass. There are 2 ways to use the tabs component.
there’s only one or two pieces of short, less important content - the details component is more suitable as it’s visually smaller and less prominent than an accordion or tabs. there are many pieces of content - tabs can fit fewer sections as they’re arranged horizontally, unlike accordions which are arranged vertically. the user needs to switch quickly between sections - tabs can show content without pushing other sections down the page, unlike accordions. the user does not need to view more than one section at a time - consider using tabs. If you decide to use one of these components, consider if: Tabs, accordions, and details all hide sections of content which a user can choose to reveal. use a table of contents to let users navigate quickly to specific sections of contentĭecide between using tabs, accordion and details. keep the content on a single page, separated by headings. split the content across multiple pages. simplify and reduce the amount of content. compare information in different tabs - having to memorise the information and switch backwards and forwards can be frustrating and difficult. read through all of the content in order, for example, to understand a step-by-step process. Tabs hide content from users and not everyone will notice them or understand how they work.ĭo not use tabs if your users might need to: For this reason, do not use the tabs component as a form of page navigation. When not to use this componentĭo not use the tabs component if the total amount of content the tabs contain will make the page slow to load. Their need to perform tasks quickly may be greater than their need for simplicity of first-time use. Tabs can work well for people who use a service regularly, for example, users of a caseworking system. users will not need to view all the sections at once. the first section is more relevant than the others for most users. your content can be usefully separated into clearly labelled sections. Tabs can be a helpful way of letting users quickly switch between related information if: HTML attributes (for example data attributes) to add to the tab panel. If html is provided, the text option will be ignored. HTML attributes (for example data attributes) to add to the tab. If omitted, then idPrefix string is required instead. HTML attributes (for example data attributes) to add to the tabs component. String to prefix id for each tab item if no id is specified on each item.
This is used for the main component and to compose the ID attribute for each item. If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits. Some options are required for the macro to work these are marked as "Required" in the option description. Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. Past day Case manager Cases opened Cases closed David Francis 3 0 Paul Farmer 1 0 Rita Patel 2 0 Past week Case manager Cases opened Cases closed David Francis 24 18 Paul Farmer 16 20 Rita Patel 24 27 Past month Case manager Cases opened Cases closed David Francis 98 95 Paul Farmer 122 131 Rita Patel 126 142 Past year Case manager Cases opened Cases closed David Francis 1380 1472 Paul Farmer 1129 1083 Rita Patel 1539 1265 There is a problem with the service pages Replace variables, functions and mixins from our old frameworksĮxtending and modifying components in production