The word 'structure' in this context is used as the term to encapsulate how a document and pieces of a document are put together.
There are five pieces of the design system that work together to make our structure.
1. HTML - The fundamental building blocks of the Web. In order to get the most from Nucleus it is important that the structure of the HyperText Markup Language is correct.
2. Panel -
<ns-panel> is always a child of the
<main> element or it's encapsulated within a component that is a child of the
3. Layout - This is the area within
<ns-panel> that either adopts the natural behaviour defined by itself, or having a class applied to either a
4. Columns - To introduce a column structure use either a class
<div class="triple"> or include attributes on the
5. Component - Within our components we include responsive columns and layout decisions.
In it's basic form, the markup for the most performant and accessible page starts with the following:
Here is the Nucleus HTML Structure in Github.
This piece of our structure provides a container for a single topic or task. Think of
<ns-panel> as a part of a document which may contain multiple sections.
The general layout of our components fits within a content area in between margins that are generally and equally 5% of the total viewport width, up to 1,600 px wide. When that happens, the main content area remains fixed at that size, but the left and right margins then expand equally to fill the rest of the horizontal space as the viewport width increases over 1,600 px.
It allows our layouts to respond to different devices dynamically and be optimal for comfortable scanning and content consumption.
When we discuss columns, we often refer to layout and the
ns-column component. Some of our components have column behaviour baked into them.
An example of a component that adapts its appearance responsively within a column layout is the section variant of
In this screenshot we can observe the responsive behaviour of the
squash-court a card will fill the horizontal width of the content area between the left and right margins, the
ns-cta also stretching across full width to aid user interaction as this width would typically be a touch device.
tennis-court the cards are still filling the one central column but the ns-cta has adapted to be shorter in width.
basketball-court the cards have been defined in the
ns-column properties to fit across 2 columns to produce a comfortable reading experience.
hockey-pitch the cards have been defined in the
ns-column properties to adapt to a 3 column layout.
rugby-pitch and above, the cards, still defined to fit a 3 column layout, remain at the same width but the margins expand thereon.
ns-lockup typically contains a two column layout at
hockey-pitch and above, with a 50%/50% layout.
The landmark, notably the summit variant changes in many ways. Starting at 100% in
tennis-court then adapting to keep the content high in the view in
basketball-court, then a 60%/40% layout in
hockey-pitch and above.
Each of our components can adopt a relevant layout at any of our viewports in order to take advantage of the best responsive solution.
This can be seen in the responsive behaviour of the section card where the illustration moves from left to right depending on the best use of space.
Displays stacked at
basketball-court and then a side-by-side consuming 100% width in
basketball-court and then, 66% width in
hockey-pitch and above.
The cards that adapt the most are
support with image
An image can be left or right, from
hockey-pitch and larger but they will display on the right only and stack at smaller viewports.
The alert icon in
highlighter variant swaps from a stacked position in
squash-court to the left in larger viewports, to optimise the space used.
Lots of responsive decisions are contained within each
ns-landmark for example, the
summit variant there is no
tennis-court and at
basketball-court the card overlaps the image. At
hockey-pitch and above the card sticks to the left in a 60%/40% layout.
The ns-lockup behaves responsively too, adjusting its overlaps most appropriately for the given viewport.
The image within
ns-selector adapts to different positions and sizes.
Components that are placed outside of