Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

nys_ds

1 sites No security coverage
View on drupal.org

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 %}
  <p class="display--content">
    <span class="display--label">My custom variable:</span> {% myCustomVariable %}
  </p>
  {{ fields.field_some_field.content }}
{% endset %}
{% include 'nys_ds:accordionitem' with {
  id: accordionItemId
  heading: accordionItemHeading,
  content: customContentBlock
} %}

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

Activity

Total releases
6
First release
Mar 2026
Latest release
1 day ago
Release cadence
19 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.17.0-beta3 Pre-release Jun 12, 2026
1.17.0-beta2 Pre-release Jun 9, 2026
1.17.0-beta1 Pre-release Jun 4, 2026
1.16.1-alpha1 Pre-release May 7, 2026
1.15.1-alpha1 Pre-release Apr 15, 2026
1.0.x-dev Dev Mar 11, 2026