Skip to main content
Login

Sign in to access your account

Side Info - National Design System

A column beside the content of a section, for the facts of a service, the progress of a form, or a table of contents.

Overview

Side info sits in a section whose body is a row: the content in .nds-info-content, and the column in aside.nds-sideinfo. The aside sets the width, the place and the sticky behavior. It has no look of its own: the cards inside it have the look.

The preview shows it in a frame of its own, with a hero above it, so the column can move up beside the page title. A placeholder stands in for the card in the column: the Related templates show real content.

Pick another component when:

  • the links go to the pages of one part of the site: Side Menu
  • the reader opens the extra information and closes it again: Panels
  • the facts belong in the content, with no column: Definition List

The side info is the side column of a standard page. The other page columns are on Page Layout.

Markup

Preview
<section class="nds-hero-section nds-sub"> <nav class="nds-breadcrumb-nav" aria-label="Breadcrumb" data-i18n-aria-label="breadcrumb.breadcrumb"> <ol class="nds-breadcrumb"> <li><a href="#">Home</a></li> <li class="nds-truncate" aria-current="page">Renew a Passport</li> </ol> </nav> <div class="nds-section-wrapper"> <div class="nds-section-head"> <h1 class="nds-section-title">Renew a Passport</h1> <p class="nds-section-description">Renew your passport online through Absher, with no visit to an office.</p> </div> </div> </section> <div class="nds-content-layout nds-has-sideinfo"> <div class="nds-content" id="main-content"> <section class="nds-content-section nds-sideinfo-section"> <div class="nds-section-body"> <div class="nds-info-content"> <article class="nds-prose"> <h2>Service Description</h2> <p>This service renews a Saudi passport that has expired or expires within six months.</p> <p>The new passport is ready within 3 working days, at the office you pick.</p> <h2>Required Documents</h2> <ul> <li>The old passport</li> <li>A recent photo with a white background</li> <li>The national ID of the applicant</li> </ul> <h2>Steps</h2> <ol> <li>Sign in to Absher with your national ID.</li> <li>Open Passports, then Renew a Passport.</li> <li>Pay the fee, then pick the office for delivery.</li> </ol> <h2>Terms</h2> <p>The applicant must have no unpaid traffic fines.</p> <p>A passport for a person under 21 needs the approval of the guardian.</p> <h2>Fees</h2> <p>The fee is 300 riyals for 5 years, or 600 riyals for 10 years.</p> <p>The portal takes the fee by card or through SADAD before it sends the request.</p> </article> </div> <aside class="nds-sideinfo nds-sticky nds-top" aria-label="Service information"> <div class="nds-card nds-stroke nds-shadow"> <div class="nds-content-placeholder"> <span>Swap with the column's card</span> <span>استبدل هذا العنصر بمحتوى العمود</span> </div> </div> </aside> </div> </section> </div> </div>

Parts

Part Holds Required
section.nds-hero-section.nds-sub The page hero. With nds-aside, the column moves up beside its title. See Hero No
.nds-content-layout.nds-has-sideinfo The page content. nds-has-sideinfo sets the section padding of a page with a side column. See Page Layout Yes
section.nds-sideinfo-section A .nds-section-body with the content and the column Yes
.nds-info-content The content of the section, usually an article Yes
aside.nds-sideinfo The column. Give it an aria-label that names what it holds Yes
The block A direct child of the aside, such as a definition list, a table of contents, a stepper or a group. nds-card on it is optional and changes only the look. The aside can hold several. For several blocks in one card, use a div with nds-card that holds groups Yes
.nds-sideinfo-group One block with a title: a span.nds-sideinfo-title, then its definition list or links. It sits in the aside or in a card No

Behavior

Sticky Column

nds-sticky on the aside keeps the column in view below the main navigation while the content scrolls. While the column is taller than the screen, the script removes nds-sticky, so the reader can scroll to its end. It adds the class back when the column fits again. Below 960px, nds-sticky has no effect.

Sticky on Small Screens

nds-sticky-md keeps the column in view below 960px, and nds-sticky-sm below 600px only. The column then spans the screen below the main navigation, with a shadow under it. Each one works alone or with nds-sticky. Write nds-top with it: under the content, the column is the last item in its section, so it never sticks. Like nds-sticky, the script removes it while the column is taller than the screen.

Column Order

The aside shows where it is in the markup: after the content, it is on the end side and under the content below 960px. nds-reverse moves it to the start side, and above the content below 960px. nds-top moves it above the content below 960px only. For navigation such as a table of contents, write the aside first instead: it is then on the start side and on top, and keyboard users reach it first.

Beside the Title

nds-aside on the sub hero narrows the hero text by the column width. At 960px and wider, the script then measures the hero and moves the column up beside the title. It measures again when the screen size changes, when the hero changes size, and after the fonts and images load. Below 960px, the column stays in its section. It works only with the column on the end side, so do not write it with nds-reverse.

Built-in Features

  • Auto Start

    The script starts each .nds-sideinfo on the page when it loads.

  • Responsive Stack

    Below 960px, the row becomes a column, and the side info takes the full width.

  • Width by Content

    The column is 400px wide, or 300px when it holds a table of contents.

  • Stacked Cards

    Several cards in the column stack, with --nds-sideinfo-gap between them.

  • Column Card

    The card in the column fills its width, with the menu background and a larger padding.

  • Compact Facts

    A definition list in the column keeps its own size: large by default, or the size class on the list.

  • Section Gaps

    In an article in the content, each .nds-section-title after the first gets space above it.

Best Practices

  • Put information about the section’s content in the column: facts, progress, a table of contents, or links to related pages such as related news. Do not put ads in it.
  • Put nds-card on the card inside the aside, never on the aside.
  • Give each topic its own block. Use one card with groups for short blocks that belong together, such as contact numbers.
  • Keep the column short. Use a definition list for facts and a stepper for progress, not long paragraphs.
  • Make the column sticky beside long content. On a short page, the reader sees all of it without help.
  • Use Beside the title only when the column is about the whole page, and only in the first section.
  • Give the aside an aria-label that names what it holds, such as “Service information”.

API

Other Classes

Class Element Effect
nds-sticky-sm aside.nds-sideinfo.nds-top Keeps the column in view below 600px only, as a strip across the screen. Tablets scroll it

CSS Custom Properties

Property Default Controls
--nds-sideinfo-width None The width of the column at 960px and wider. Without it, the column is 400px, or 300px when it holds a table of contents. Set it in the style of one aside, or on :root for every column. With Beside the title, set it on :root: the hero reads it from there
--nds-sideinfo-gap var(--spacing-4xl) The space between the cards in the column. Set it on the aside, or on :root for every column
--nds-sideinfo-top-offset 0px Space above the column, at 960px and wider: it adds to the sticky top, and to the move beside the title. Set it in the style attribute of the aside
--nds-sideinfo-top None The distance from the section to the hero’s title, for Beside the title. The script writes it on the aside at 960px and wider. Until then, the CSS uses -180px. Do not set it

JavaScript

Method Effect
NDS.Sideinfo.init() Starts each .nds-sideinfo on the page that has not started. It runs on page load
NDS.Sideinfo.create(el) Starts one column and returns its instance, or the instance it already has. Returns null when the column has no parent element. Call it once for each column
NDS.Sideinfo.destroy(el) Stops one column: it removes the listeners and --nds-sideinfo-top, and adds back the sticky classes the markup had. NDS.init.destroy() calls it for each column in the element it releases

The side info fires no events.

// A framework rendered a new section with side info after the NDS script ran: // start the column and the components in it NDS.init.mount(document.querySelector('.nds-sideinfo-section')); // A framework removes the section: release it first NDS.init.destroy(document.querySelector('.nds-sideinfo-section'));

The full API is in the banner of _js/nds-sideinfo.js.

Last Modified Date: 03/11/2026 - 11:59 AM
Was this page useful?
60% of users said Yes from 2843 Feedbacks