Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Configuration Language Lock 1.0.2 Minor update available for module config_language_lock (1.0.2). Release: Canvas Override 1.0.1 Minor update available for module canvas_override (1.0.1). Release: Media Remote Image 8.x-1.2 Minor update available for module media_entity_remote_image (8.x-1.2). Release: IDNA Convert Service (punycode) 2.0.4 Minor update available for module idna (2.0.4). Release: Bootstrap Cloud 7.1.3 Minor update available for theme bootstrap_cloud (7.1.3). Release: Token Browser 1.0.2 Minor update available for module token_browser (1.0.2). Release: Varbase Project 11.0.8 Minor update available for module varbase_project (11.0.8). Release: Media Remote Image 2.0.0-beta1 First beta version released for module media_entity_remote_image (2.0.0-beta1). Usage Milestone: Term CSV Export Import Module term_csv_export_import crossed 1,000 active installs. Security Coverage: Module Scout Module module_scout now has official Drupal security advisory coverage.

This module provides Drupal library support for New York State Design System components within traditional theme-based frontends. It makes NYS Design System components available for use directly in your Drupal site's templates.

New York State Design System Libraries provides Drupal library support for NYS Design System components in sites using a traditional theme-based frontend. It is not intended for detached frontends or SPAs; for those, include the NYSDS library directly in your project.

For a full description of the module, visit the project page or the module's expanded documentation page.

Submit bug reports and feature suggestions, or track changes in the issue queue.

Requirements

There are no additional module or library dependencies. The NYS Design System library is included fully built at a specific version inside the module itself (see Installation below).

Installation

Install as a normal contributed Drupal module. For further information, see: Installing Drupal Modules.

This project is versioned to match a specific NYSDS release. We recommend installing the version of this module that corresponds to the version of NYSDS you need. Avoid using ^ or ~ in your composer constraints so upgrades remain deliberate and reviewable.

After installation, add this module as a dependency for any theme or module that will use NYSDS components. This is not required for Drupal to register the components, but it is recommended for clarity and dependency management.

Configuration

No active configuration is required. The module uses Drupal's built-in component registration system to provide template references for NYSDS components.

Usage

Example using the alert component in a Twig template:

{% set alertTypeLabel = fields.field_alert_type.content %}
{% if alertTypeLabel == 'Warning' %}
  {% set alertType = 'danger' %}
  {% set alertIcon = 'warning' %}
{% elseif alertTypeLabel == 'Information' %}
  {% set alertType = 'warning' %}
  {% set alertIcon = 'info' %}
{% endif %}
{% set alertLabel = fields.field_alert_label.content %}
{% include 'nys_ds:alert' with {
  type: alertType,
  icon: alertIcon,
  heading: alertLabel,
  text: fields.field_alert_message.content,
  primaryLabel: alertTypeLabel
} %}

Whenever a property requires rendered HTML, it's always best to pass it a render array or a twig block as follows:

{% set customContentBlock %}
  My variable: {% myVariable %}
{% endset %}

For much more expanded and detailed usage guidance, including webform components, see our expanded documentation.

Example site

This repository includes an example site configured with DDEV. Use it to explore how NYSDS components are applied in a Drupal context.

For more information, see our expanded documentation for the example site.

Maintainers

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
9
Tracked since
Mar 2026
Latest release
2 weeks ago
Releases (12 mo)
9 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.20.0-beta1 Pre-release 11 Aug 25, 2026
1.19.4-beta1 Pre-release 11 Jul 28, 2026
1.17.0-beta4 Pre-release 11 Jun 24, 2026
1.17.0-beta3 Pre-release 11 Jun 12, 2026
1.17.0-beta2 Pre-release 11 Jun 9, 2026
1.17.0-beta1 Pre-release 11 Jun 4, 2026
1.16.1-alpha1 Pre-release 11 May 7, 2026
1.15.1-alpha1 Pre-release 11 Apr 15, 2026
1.0.x-dev Dev 11 Mar 11, 2026