- Taxonomic name: M-DATA-GROUP
- Added on: v3.0.0 (15/09/17)
- Updated on: v5.4.0 (23/02/21)
Data group
A data group is a way of laying out data for ease of scanning, ensuring that key information is afforded prominence. It can used to used to play information back to user that has already been entered.
Design and usage
Structure
- Consider key information that users will scan for and ensure it is afforded sufficient prominence.
-
The data item can be either H2 or H3 styled font
- PROHIBITED: Mixing variants within the same column row
-
Data layout can only be used with these light and dark accent colour backgrounds:
-
Light
- White #FFF
- Light grey #EEE
-
Dark
- Dark blue #001647
- Accent blue #1A61BD
- Dark teal #00788A
- Dark grey #413E45
- Do not use on any other accent colour
-
-
Data layout groups can combine different column widths
-
Desktop:
- 1 data group - up to 8 columns
- 2 data group - 50/50% (6 + 6 columns)
- 3 data group - 33% (4 + 4 + 4 columns)
- 3 data group - 50/25/25% (6 + 3 + 3 columns) or vice versa
- 4 data group - 25% (3 + 3 + 3 + 3 columns)
-
Tablet:
- 1 data group - 6 or 8 columns
- 2 or more data groups - 50/50% (4 + 4 columns)
-
Mobile:
- 1 or more data groups - 4 columns
-
-
Columns progressively decrease or increase based on device size:
- 4 columns modifier, reduces to 2, then 1
- 3 columns modifier, reduces to 2, then 1
- 2 columns modifier, reduces to 1
- 1 column by default shows 1 column of data and wraps
- NOTE: the 4 column layout never decreases to 3 columns, it'll switch straight to 2 columns.
- For mobile, all columns will always display in a single column, with the data items wrapping down the page.
- For readability reasons, the width of the supporting text has a maximum of 8 columns (810px) regardless of the width of its parent container. In any case, its width should not exceed that of its parent's heading max width.
- Try to keep any supporting text short and informative. Up to 120 characters is recommended
-
Supporting text can use the following styles:
- Body copy
- Text links within body copy
- Bullet list
- Ordered list; numerical or alphabetical
- Tick/cross list
- Plus/minus list
- Numeric indicators
Accessibility and Screen Readers
- N/A
Placement
- Supporting text should sit 10px directly beneath its heading (H2 or H3)
Design anatomy
- Data layout: No top or bottom margin (determined by children; effective bottom margin 30px from last item) or padding (determined by parent)
- Supporting text area: 10px below heading, 30px bottom margin
Examples
Interactive example
One column
Two columns
Three columns
Four columns
Four columns with first column at double width
Four columns using smaller data size
Code example
<ul class="m-data-group [ Modifiers ]">
<li class="m-data-group-item">
<h3 class="m-data-group-item__title">...</h3>
<p class="m-data-group-item__data">...</p>
<div class="m-data-group-item__supporting-text">
...
</div>
</li>
</ul>
Development and test
Notes for developers
.m-data-group--double
can only be used in conjuction with .m-data-group--4-column
Notes for testers
Ensure the headings used within the data group follow the correct hierarchy.
Classes overview
The following table gives you a quick overview of the CSS classes that can be applied.
Class | Outcome | Required | Applied to | Comments |
---|---|---|---|---|
.m-data-group |
Base style the data group | Yes | ul |
|
.m-data-group--data-small |
Modifier to reset data item font to a smaller size |
.m-data-group
|
Styles the data item to an H3 styled font | |
.m-data-group--2-column |
Modifier to put data into two columns |
.m-data-group
|
Displays 2 columns at desktop, 2 at tablet, 1 at mobile | |
.m-data-group--3-column |
Modifier to put data into three columns |
.m-data-group
|
Displays 3 columns at desktop, 2 at tablet, 1 at mobile | |
.m-data-group--4-column |
Modifier to put data into four columns |
.m-data-group
|
Displays 4 columns at desktop, 2 at tablet, 1 at mobile | |
.m-data-group--double |
Modifier to put data into four columns with first column double width |
.m-data-group--4-column
|
Only to be used in conjuction with .m-data-group--4-column .Displays 4 columns at desktop, 2 at tablet, 1 at mobile |
|
.m-data-group-item |
Base style for a data item. | Yes |
.m-data-group > li
|
|
.m-data-group-item__title |
Base style for heading of individual data item | Yes |
.m-data-group-item > h2 .m-data-group-item > h3 .m-data-group-item > h4 .m-data-group-item > h5
|
Data title is a fixed style, equivalent to Heading 4, bold weight and colour of #444 |
.m-data-group-item__data |
Base style for value of individual data item | Yes |
.m-data-group-item > p .m-data-group-item > ul
|
|
.m-data-group-item__supporting-text |
Wrapper style for supporting text |
.m-data-group-item > div
|
Styles the supporting text to conform with other data spacing |
Component releases
- Added on: v3.0.0 (15/09/17)
- Updated on: v5.4.0 (23/02/21)
Latest update:
- updated: Added support for standard bullets to be used with data group list items for use with lists of data such as insured vehicles on a policy. The spacing between data group list items has also been reduced to 5px to improve component consistency. The font size used within the smaller data size variant has been corrected to 20px, matching with standard framework font sizing an line heights.