Skip to main content
Login

Sign in to access your account

Digital Stamp - National Design System

The DGA digital stamp in the top bar. Its tab opens an expander that shows how to check the site and its DGA registration number.

Overview

The digital stamp tells people that the site is a government website registered with the Digital Government Authority (DGA). Its tab sits first in the Top Bar. The tab opens the stamp below the bar: two cards, one on the site’s address and one on HTTPS, and the site’s DGA registration number.

The stamp is a top bar expander: the top bar opens and closes it. This page covers its content and its text.

The stamp is a page shell part. The preview shows it open, in a frame of its own, so it does not clash with this page’s own stamp. The tab’s markup is in the Top Bar canon.

Markup

Preview
<div id="nds-digital-stamp" class="nds-topbar-expander" role="region" aria-label="Digital government stamp" data-i18n-aria-label="digital-stamp.label" hidden> <div class="nds-content-wrapper"> <div class="nds-topbar-expander-content"> <div class="nds-digital-stamp-notices"> <div class="nds-digital-stamp-card"> <div class="nds-digital-stamp-icon"> <i class="nds-icon nds-hgi-link-04" aria-hidden="true"></i> </div> <div class="nds-digital-stamp-content"> <div class="nds-digital-stamp-heading"><span data-i18n="digital-stamp.gov_title">Official Saudi Government websites URL ends with</span> <span class="nds-digital-stamp-highlight" data-i18n="digital-stamp.gov_mark">.gov.sa</span></div> <div class="nds-digital-stamp-description" data-i18n="digital-stamp.gov_desc">Website belongs to an official government organization in the Kingdom of Saudi Arabia always ends with .gov.sa .</div> </div> </div> <div class="nds-digital-stamp-card"> <div class="nds-digital-stamp-icon"> <i class="nds-icon nds-hgi-square-lock-01" aria-hidden="true"></i> </div> <div class="nds-digital-stamp-content"> <div class="nds-digital-stamp-heading"><span data-i18n="digital-stamp.https_title">Official Reliable websites use</span> <span class="nds-digital-stamp-highlight">HTTPS</span></div> <div class="nds-digital-stamp-description" data-i18n="digital-stamp.https_desc">Ensure the website is using the HTTPS protocol.</div> </div> </div> </div> <div class="nds-digital-stamp-register"> <img src="../assets/img/dga-logo-icon.svg" width="21" height="31" alt="Digital Government Authority" data-i18n-alt="digital-stamp.dga" loading="lazy"> <div> <span class="nds-digital-stamp-register-text" data-i18n="digital-stamp.register">Registered on Digital Government Authority:</span> <a class="nds-digital-stamp-registration nds-primary nds-underline" href="#" target="_blank">00000000000</a> </div> </div> </div> </div> </div>

Parts

Part Holds Required
button.nds-digital-stamp-tab The tab, first in .nds-topbar: the flag, the long text (.nds-digital-stamp-lg-text), the short text (.nds-digital-stamp-sm-text) and #nds-digital-stamp-verify-text. It is a top bar toggle: aria-controls names the stamp Yes
#nds-digital-stamp The stamp, a .nds-topbar-expander right after the bar. It ships hidden Yes
.nds-topbar-expander-content Inside the stamp’s .nds-content-wrapper: the notices and the register, with the stamp’s space above and below them Yes
.nds-digital-stamp-notices Two .nds-digital-stamp-card cards: the site’s address, then HTTPS Yes
.nds-digital-stamp-card .nds-digital-stamp-icon, then .nds-digital-stamp-content with a .nds-digital-stamp-heading and a .nds-digital-stamp-description. The heading holds two spans: the words, then the domain or HTTPS in .nds-digital-stamp-highlight Yes
.nds-digital-stamp-register The DGA logo, .nds-digital-stamp-register-text and the registration number, a link a.nds-digital-stamp-registration. Its number and href="#" are samples: write your DGA registration number and link Yes

Behavior

Stamp Text

The stamp’s text is DGA’s, and each word carries a data-i18n marker: NDS writes it in the page language from the digital-stamp section of the string pack. That covers the tab’s texts, the two cards, .nds-digital-stamp-register-text, the flag’s and the logo’s alt and the stamp’s aria-label.

Address Card

The canon’s address card holds the .gov.sa text. The stamp follows the site’s own domain: on iu.edu.sa it points the card’s markers at the .edu.sa text. An address outside .sa, such as localhost, keeps .gov.sa. data-digital-stamp-domain on #nds-digital-stamp picks the card instead.

Built-in Features

  • Short Stamp Text

    The tab shows its long text at 960px and up, and its short text below that.

  • DGA Text

    The stamp ships DGA's text in Arabic and English, with an address card for each .sa domain.

Best Practices

  • Include the stamp on every government website. DGA requires it.
  • Keep the stamp’s data-i18n markers. A word whose marker you remove stays as you wrote it.
  • On a test server, write data-digital-stamp-domain with the site’s own domain, so the address card matches the live site.
  • Remove the stamp on a site that DGA has not registered.

API

Data Attributes

Attribute Element Effect
data-digital-stamp-domain #nds-digital-stamp gov.sa, edu.sa, sch.sa, med.sa, org.sa or sa: the address card’s text. Any other value warns in the console and shows gov.sa. See Address Card
data-i18n Each word in the tab and the stamp The word’s key in the digital-stamp section of the string pack. The address card’s keys start with gov_: the script changes them to the domain’s

The attributes that open and close the stamp are on Top Bar.

JavaScript

Method Effect
NDS.DigitalStamp.init() Points the address card at the site’s domain. The loader runs it when #nds-digital-stamp is on the page

Open and close the stamp with NDS.Topbar. The top bar fires nds:topbar:opened and nds:topbar:closed on #nds-digital-stamp, with the stamp in detail.expander.

NDS.Topbar.open('nds-digital-stamp');

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

Last Modified Date: 01/11/2026 - 08:07 PM
Was this page useful?
60% of users said Yes from 2843 Feedbacks