Learning card

A card component designed to present learning activities, courses, and catalogue items across different states of the user journey.

Overview

The learning card component provides a consistent visual wrapper for educational content across NHS TEL platforms. It supports various states throughout a learner's workflow—from initial content discovery and active course progression through to completion, certification, and catalogue browsing.

Examples

Default (Listing)

Used as a baseline text listing within reading-width containers, suitable for simple content feeds or search results where full card framing is not required.

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    <div class="nhsuk-card tel-learning-card tel-learning-card--learning-card">
      <div class="nhsuk-card__content">
        <div class="tel-learning-card__heading">
          <a href="#" class="tel-learning-card__heading-link">
            <h3 class="tel-learning-card__heading-text">
              Symptom Management in End of Life Care
            </h3>
          </a>
        </div>

        <div class="tel-learning-card__content">
          <div class="tel-learning-card__description">
            <p>
              Learn fundamental principles for identifying, assessing, and
              managing distressing symptoms in palliative patients.
            </p>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Nunjucks macro options

Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.

Some options are required for the macro to work; these are marked as "Required" in the option description.

If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.

{% from 'tel/components/learning-card/macro.njk' import telLearningCard %}

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    {{ telLearningCard({
      showAsCard: true,
      headingLevel: 3,
      heading: "Symptom Management in End of Life Care",
      description: "Learn fundamental principles for identifying, assessing, and managing distressing symptoms in palliative patients.",
      type: "e-Learning"
    }) }}
  </div>
</div>

Card container variant

Used when the learning card is rendered inside a structured NHS card container with a hero image, community star ratings, completion metadata, and catalogue footer links.

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    <div
      class="nhsuk-card tel-learning-card tel-learning-card--learning-card tel-learning-card--course-card"
    >
      <img
        class="nhsuk-card__img"
        src="https://assets.nhs.uk/prod/images/A_0218_exercise-main_FKW1X7.width-690.jpg"
        alt="Card image alt text"
      />

      <div class="nhsuk-card__content">
        <div class="tel-learning-card__heading">
          <a href="#" class="tel-learning-card__heading-link">
            <h3 class="tel-learning-card__heading-text">
              Infection Prevention and Control - Level 2
            </h3>
          </a>
        </div>

        <div class="tel-learning-card__content">
          <div class="tel-learning-card__description">
            <p>
              Standard precautions and best practices for clinical healthcare
              workers across hospital settings.
            </p>
          </div>

          <div class="tel-learning-card__rating">
            <div class="tel-rating tel-rating--star">
              <div class="tel-rating__container">
                <div class="tel-rating__progress">
                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <div class="tel-rating__cover" style="width: 10%"></div>
                </div>
              </div>

              <div class="tel-rating__description">
                4.5 out of 5

                <span class="tel-rating__link">45 ratings</span>
              </div>
            </div>
          </div>

          <div class="tel-learning-card__key-activity-information">
            <div class="tel-learning-card__key-info--completed-container">
              <div class="tel-learning-card__key-info__container">
                <div class="tel-learning-card__key-info__information">
                  <dl
                    class="nhsuk-summary-list nhsuk-summary-list--no-border tel-learning-card__summary-list"
                  >
                    <div class="nhsuk-summary-list__row">
                      <dt class="nhsuk-summary-list__key">Type:</dt>
                      <dd class="nhsuk-summary-list__value">Course</dd>
                    </div>
                  </dl>
                </div>

                <div class="tel-learning-card__key-info__status">
                  <strong class="nhsuk-tag nhsuk-tag--green">
                    Completed
                  </strong>
                </div>
              </div>

              <div class="tel-learning-card__awarded-section-wrapper">
                <div class="tel-learning-card__awarded-content"></div>
              </div>
            </div>
          </div>
        </div>

        <div class="tel-learning-card__footer">
          <div class="tel-learning-card__catalogue">
            <img
              src="https://picsum.photos/100"
              alt=""
              class="tel-learning-card__catalogue-image"
            />

            <a href="#" class="tel-learning-card__catalogue-link">
              Enabling Effective Learning
            </a>
          </div>

          <div class="tel-learning-card__developed-with">
            Developed with elearning for healthcare
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Nunjucks macro options

Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.

Some options are required for the macro to work; these are marked as "Required" in the option description.

If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.

{% from 'tel/components/learning-card/macro.njk' import telLearningCard %}

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    {{ telLearningCard({
      isCourse: true,
      showAsCard: true,
      image: {
        src: "https://assets.nhs.uk/prod/images/A_0218_exercise-main_FKW1X7.width-690.jpg",
        alt: "Card image alt text"
      },
      headingLevel: 3,
      heading: "Infection Prevention and Control - Level 2",
      description: "Standard precautions and best practices for clinical healthcare workers across hospital settings.",
      starRating: 90,
      ratingCount: 45,
      activitiesCompleted: 8,
      totalActivities: 8,
      type: "Course",
      awardedDate: "22 Jan 2026",
      catalogueImage: "https://picsum.photos/100",
      catalogueLinkUrl: "#",
      catalogueLinkText: "Enabling Effective Learning",
      developedWith: "Developed with elearning for healthcare"
    }) }}
  </div>
</div>

Course discovering

Used when a learner is exploring new content. It highlights key discovery metadata such as community star ratings, activity counts, content types, and certificate availability.

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    <div class="nhsuk-card tel-learning-card tel-learning-card--learning-card">
      <div class="nhsuk-card__content">
        <div class="tel-learning-card__heading">
          <a href="#" class="tel-learning-card__heading-link">
            <h3 class="tel-learning-card__heading-text">
              Infection Prevention and Control - Level 2
            </h3>
          </a>
        </div>

        <div class="tel-learning-card__content">
          <div class="tel-learning-card__description">
            <p>
              Standard precautions and best practices for clinical healthcare
              workers across hospital settings.
            </p>
          </div>

          <div class="tel-learning-card__rating">
            <div class="tel-rating tel-rating--star">
              <div class="tel-rating__container">
                <div class="tel-rating__progress">
                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <div class="tel-rating__cover" style="width: 10%"></div>
                </div>
              </div>

              <div class="tel-rating__description">
                4.5 out of 5

                <span class="tel-rating__link">45 ratings</span>
              </div>
            </div>
          </div>

          <div class="tel-learning-card__key-activity-information">
            <div class="tel-learning-card__not-started-container">
              <div class="tel-learning-card__key-info__information">
                <dl
                  class="nhsuk-summary-list nhsuk-summary-list--no-border tel-learning-card__summary-list tel-learning-card__summary-list--compact"
                >
                  <div class="nhsuk-summary-list__row">
                    <dt class="nhsuk-summary-list__key">Type:</dt>
                    <dd class="nhsuk-summary-list__value">Course</dd>
                  </div>

                  <div class="nhsuk-summary-list__row">
                    <dt class="nhsuk-summary-list__key">Includes:</dt>
                    <dd class="nhsuk-summary-list__value">8 activities</dd>
                  </div>

                  <div class="nhsuk-summary-list__row">
                    <dt class="nhsuk-summary-list__key">With</dt>
                    <dd class="nhsuk-summary-list__value">1 certificate</dd>
                  </div>
                </dl>
              </div>

              <div
                class="tel-learning-card__action-icon tel-learning-card__action-icon--blue"
              >
                <svg
                  class="certificate-icon certificate-icon--blue"
                  id="Layer_1"
                  data-name="Layer 1"
                  xmlns="http://www.w3.org/2000/svg"
                  xmlns:xlink="http://www.w3.org/1999/xlink"
                  viewBox="0 0 38 48"
                >
                  <g class="cls-6">
                    <g>
                      <path
                        class="cls-2"
                        d="M27.57,37.95v8.43c0,.45-1.22.67-1.87.33l-5.7-2.95c-.44-.22-1.2-.22-1.63.01l-5.16,2.86c-.64.35-1.9.15-1.9-.32v-11.1"
                      />
                      <path
                        class="cls-5"
                        d="M36.92,18.17c0,1.25-2.26,2.23-2.53,3.41s1.33,3.08.8,4.17-3,1.01-3.77,1.97c-.76.96-.13,3.34-1.09,4.1-.96.77-3.14-.39-4.25.15-1.11.54-1.55,2.95-2.76,3.23-1.21.27-2.64-1.71-3.89-1.71s-2.72,1.98-3.89,1.71c-1.17-.27-1.67-2.7-2.76-3.23-1.1-.52-3.29.61-4.25-.15-.96-.76-.32-3.14-1.09-4.1-.77-.96-3.23-.86-3.76-1.97-.53-1.11,1.08-2.96.8-4.17-.27-1.21-2.53-2.15-2.53-3.41s2.26-2.23,2.53-3.41c.27-1.18-1.33-3.08-.8-4.17.53-1.09,3-1.01,3.77-1.97.76-.96.13-3.34,1.09-4.1.96-.77,3.14.39,4.25-.15,1.11-.54,1.55-2.95,2.76-3.23,1.21-.27,2.64,1.71,3.89,1.71s2.72-1.98,3.89-1.71c1.17.27,1.67,2.7,2.76,3.23,1.1.52,3.29-.61,4.25.15.96.76.32,3.14,1.09,4.1.77.96,3.23.86,3.76,1.97.53,1.11-1.08,2.96-.8,4.17.27,1.21,2.53,2.15,2.53,3.41Z"
                      />
                      <path
                        class="cls-2"
                        d="M36.92,18.17c0,1.25-2.26,2.23-2.53,3.41s1.33,3.08.8,4.17-3,1.01-3.77,1.97c-.76.96-.13,3.34-1.09,4.1-.96.77-3.14-.39-4.25.15-1.11.54-1.55,2.95-2.76,3.23-1.21.27-2.64-1.71-3.89-1.71s-2.72,1.98-3.89,1.71c-1.17-.27-1.67-2.7-2.76-3.23-1.1-.52-3.29.61-4.25-.15-.96-.76-.32-3.14-1.09-4.1-.77-.96-3.23-.86-3.76-1.97-.53-1.11,1.08-2.96.8-4.17-.27-1.21-2.53-2.15-2.53-3.41s2.26-2.23,2.53-3.41c.27-1.18-1.33-3.08-.8-4.17.53-1.09,3-1.01,3.77-1.97.76-.96.13-3.34,1.09-4.1.96-.77,3.14.39,4.25-.15,1.11-.54,1.55-2.95,2.76-3.23,1.21-.27,2.64,1.71,3.89,1.71s2.72-1.98,3.89-1.71c1.17.27,1.67,2.7,2.76,3.23,1.1.52,3.29-.61,4.25.15.96.76.32,3.14,1.09,4.1.77.96,3.23.86,3.76,1.97.53,1.11-1.08,2.96-.8,4.17.27,1.21,2.53,2.15,2.53,3.41Z"
                      />
                      <path
                        class="cls-4"
                        d="M19.3,26.58l-8.59-10.51,3.72-5.52h10.31l3.44,5.52-8.88,10.51Z"
                      />
                      <path
                        class="cls-4"
                        d="M19.39,26.58l-3.95-10.51,1.71-5.52h4.73l1.58,5.52-4.07,10.51Z"
                      />
                      <path class="cls-3" d="M11.08,15.99h14.04" />
                    </g>
                  </g>
                </svg>
              </div>
            </div>
          </div>
        </div>

        <div class="tel-learning-card__footer">
          <div class="tel-learning-card__developed-with">
            Developed with elearning for healthcare
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Nunjucks macro options

Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.

Some options are required for the macro to work; these are marked as "Required" in the option description.

If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.

{% from 'tel/components/learning-card/macro.njk' import telLearningCard %}

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    {{ telLearningCard({
      showAsCard: true,
      headingLevel: 3,
      heading: "Infection Prevention and Control - Level 2",
      description: "Standard precautions and best practices for clinical healthcare workers across hospital settings.",
      type: "Course",
      starRating: 90,
      ratingCount: 45,
      activitiesCompleted: 0,
      totalActivities: 8,
      numberOfCertificates: 1,
      developedWith: "Developed with elearning for healthcare"
    }) }}
  </div>
</div>

Course progressing

Used to track active learning. It displays current completion status, progress bar visualization, and the last accessed date to help learners pick up where they left off.

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    <div class="nhsuk-card tel-learning-card tel-learning-card--learning-card">
      <div class="nhsuk-card__content">
        <div class="tel-learning-card__heading">
          <a href="#" class="tel-learning-card__heading-link">
            <h3 class="tel-learning-card__heading-text">
              Infection Prevention and Control - Level 2
            </h3>
          </a>
        </div>

        <div class="tel-learning-card__content">
          <div class="tel-learning-card__description">
            <p>
              Standard precautions and best practices for clinical healthcare
              workers across hospital settings.
            </p>
          </div>

          <div class="tel-learning-card__key-activity-information">
            <div class="tel-learning-card__in-progress-container">
              <div class="tel-learning-card__key-info__information">
                <dl
                  class="nhsuk-summary-list nhsuk-summary-list--no-border tel-learning-card__summary-list"
                >
                  <div class="nhsuk-summary-list__row">
                    <dt class="nhsuk-summary-list__key">Type:</dt>
                    <dd class="nhsuk-summary-list__value">Course</dd>
                  </div>

                  <div class="nhsuk-summary-list__row">
                    <dt class="nhsuk-summary-list__key">Accessed:</dt>
                    <dd class="nhsuk-summary-list__value">14 Oct 2025</dd>
                  </div>
                </dl>
              </div>

              <div class="tel-learning-card__key-info__status">
                <strong class="nhsuk-tag nhsuk-tag--blue"> In progress </strong>
              </div>
            </div>

            <div class="tel-progress-bar">
              <div class="tel-progress-bar__track">
                <div class="tel-progress-bar__fill" style="width: 75%"></div>
              </div>
              <div class="tel-progress-bar__text">
                6 of 8 activities completed
              </div>
            </div>

            <div class="tel-learning-card__awarded-section-wrapper">
              <div class="tel-learning-card__awarded-content">
                <span class="nhsuk-u-font-weight-bold"
                  >Certificates gained:</span
                >

                <div class="tel-learning-card__awarded-item">
                  <div class="tel-learning-card__certificate-name-row">
                    <span class="tel-learning-card__awarded-name-text"
                      >Stage 1</span
                    >
                  </div>

                  <div class="tel-learning-card__awarded-date-row">
                    <span>Awarded: 9/7/2026</span>
                  </div>

                  <div class="tel-learning-card__certificate-link-row">
                    <a
                      href="https://en.wikipedia.org/wiki/Certificate"
                      class="tel-learning-card__download-link"
                      >Download Certificate</a
                    >
                  </div>
                </div>
              </div>
            </div>

            <div class="tel-learning-card__in-progress-certificate">
              <span class="tel-learning-card__small-cert-icon">
                <svg
                  class="certificate-icon certificate-icon--small"
                  id="Layer_1"
                  data-name="Layer 1"
                  xmlns="http://www.w3.org/2000/svg"
                  xmlns:xlink="http://www.w3.org/1999/xlink"
                  viewBox="0 0 38 48"
                >
                  <g class="cls-6">
                    <g>
                      <path
                        class="cls-2"
                        d="M27.57,37.95v8.43c0,.45-1.22.67-1.87.33l-5.7-2.95c-.44-.22-1.2-.22-1.63.01l-5.16,2.86c-.64.35-1.9.15-1.9-.32v-11.1"
                      />
                      <path
                        class="cls-5"
                        d="M36.92,18.17c0,1.25-2.26,2.23-2.53,3.41s1.33,3.08.8,4.17-3,1.01-3.77,1.97c-.76.96-.13,3.34-1.09,4.1-.96.77-3.14-.39-4.25.15-1.11.54-1.55,2.95-2.76,3.23-1.21.27-2.64-1.71-3.89-1.71s-2.72,1.98-3.89,1.71c-1.17-.27-1.67-2.7-2.76-3.23-1.1-.52-3.29.61-4.25-.15-.96-.76-.32-3.14-1.09-4.1-.77-.96-3.23-.86-3.76-1.97-.53-1.11,1.08-2.96.8-4.17-.27-1.21-2.53-2.15-2.53-3.41s2.26-2.23,2.53-3.41c.27-1.18-1.33-3.08-.8-4.17.53-1.09,3-1.01,3.77-1.97.76-.96.13-3.34,1.09-4.1.96-.77,3.14.39,4.25-.15,1.11-.54,1.55-2.95,2.76-3.23,1.21-.27,2.64,1.71,3.89,1.71s2.72-1.98,3.89-1.71c1.17.27,1.67,2.7,2.76,3.23,1.1.52,3.29-.61,4.25.15.96.76.32,3.14,1.09,4.1.77.96,3.23.86,3.76,1.97.53,1.11-1.08,2.96-.8,4.17.27,1.21,2.53,2.15,2.53,3.41Z"
                      />
                      <path
                        class="cls-2"
                        d="M36.92,18.17c0,1.25-2.26,2.23-2.53,3.41s1.33,3.08.8,4.17-3,1.01-3.77,1.97c-.76.96-.13,3.34-1.09,4.1-.96.77-3.14-.39-4.25.15-1.11.54-1.55,2.95-2.76,3.23-1.21.27-2.64-1.71-3.89-1.71s-2.72,1.98-3.89,1.71c-1.17-.27-1.67-2.7-2.76-3.23-1.1-.52-3.29.61-4.25-.15-.96-.76-.32-3.14-1.09-4.1-.77-.96-3.23-.86-3.76-1.97-.53-1.11,1.08-2.96.8-4.17-.27-1.21-2.53-2.15-2.53-3.41s2.26-2.23,2.53-3.41c.27-1.18-1.33-3.08-.8-4.17.53-1.09,3-1.01,3.77-1.97.76-.96.13-3.34,1.09-4.1.96-.77,3.14.39,4.25-.15,1.11-.54,1.55-2.95,2.76-3.23,1.21-.27,2.64,1.71,3.89,1.71s2.72-1.98,3.89-1.71c1.17.27,1.67,2.7,2.76,3.23,1.1.52,3.29-.61,4.25.15.96.76.32,3.14,1.09,4.1.77.96,3.23.86,3.76,1.97.53,1.11-1.08,2.96-.8,4.17.27,1.21,2.53,2.15,2.53,3.41Z"
                      />
                      <path
                        class="cls-4"
                        d="M19.3,26.58l-8.59-10.51,3.72-5.52h10.31l3.44,5.52-8.88,10.51Z"
                      />
                      <path
                        class="cls-4"
                        d="M19.39,26.58l-3.95-10.51,1.71-5.52h4.73l1.58,5.52-4.07,10.51Z"
                      />
                      <path class="cls-3" d="M11.08,15.99h14.04" />
                    </g>
                  </g>
                </svg>
              </span>
              <span class="tel-learning-card__small-cert-text"
                >Includes 2 certificates</span
              >
            </div>

            <div class="tel-learning-card__detailed-summary-wrapper">
              <div class="tel-learning-card__detailed-summary-content">
                <dl
                  class="nhsuk-summary-list nhsuk-summary-list--no-border tel-learning-card__summary-list tel-learning-card__summary-list--compact"
                >
                  <div class="nhsuk-summary-list__row">
                    <dt class="nhsuk-summary-list__key">Includes</dt>
                    <dd class="nhsuk-summary-list__value">8 activities</dd>
                  </div>
                </dl>
              </div>
            </div>
          </div>
        </div>

        <div class="tel-learning-card__footer">
          <div class="tel-learning-card__developed-with">
            Developed with elearning for healthcare
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Nunjucks macro options

Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.

Some options are required for the macro to work; these are marked as "Required" in the option description.

If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.

{% from 'tel/components/learning-card/macro.njk' import telLearningCard %}

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    {{ telLearningCard({
      showAsCard: true,
      headingLevel: 3,
      heading: "Infection Prevention and Control - Level 2",
      description: "Standard precautions and best practices for clinical healthcare workers across hospital settings.",
      type: "Course",
      numberOfCertificates: 2,
      awardedCertificates: [
        {
          certificateName: "Stage 1",
          awardedDate: "9/7/2026",
          certificateLink: "https://en.wikipedia.org/wiki/Certificate"
        }
      ],
      activitiesCompleted: 6,
      totalActivities: 8,
      lastAccessed: "14 Oct 2025",
      developedWith: "Developed with elearning for healthcare"
    }) }}
  </div>
</div>

Certificate card

Used when a course or learning activity has been completed. It highlights the completion status and displays the award date and download link alongside relevant course metadata.

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    <div class="nhsuk-card tel-learning-card tel-learning-card--learning-card">
      <div class="nhsuk-card__content">
        <div class="tel-learning-card__heading">
          <a href="#" class="tel-learning-card__heading-link">
            <h3 class="tel-learning-card__heading-text">
              Infection Prevention and Control - Level 2
            </h3>
          </a>
        </div>

        <div class="tel-learning-card__content">
          <div class="tel-learning-card__description">
            <p>
              Standard precautions and best practices for clinical healthcare
              workers across hospital settings.
            </p>
          </div>

          <div class="tel-learning-card__key-activity-information">
            <div class="tel-learning-card__key-info--completed-container">
              <div class="tel-learning-card__key-info__container">
                <div class="tel-learning-card__key-info__information">
                  <dl
                    class="nhsuk-summary-list nhsuk-summary-list--no-border tel-learning-card__summary-list"
                  >
                    <div class="nhsuk-summary-list__row">
                      <dt class="nhsuk-summary-list__key">Type:</dt>
                      <dd class="nhsuk-summary-list__value">Course</dd>
                    </div>
                  </dl>
                </div>

                <div class="tel-learning-card__key-info__status">
                  <strong class="nhsuk-tag nhsuk-tag--green">
                    Completed
                  </strong>
                </div>
              </div>

              <div class="tel-learning-card__awarded-section-wrapper">
                <div class="tel-learning-card__awarded-content">
                  <div class="tel-learning-card__awarded-item">
                    <div class="tel-learning-card__awarded-date-row">
                      <span class="nhsuk-u-font-weight-bold">Awarded:</span>
                      <span class="tel-learning-card__awarded-date-text"
                        >12/7/2026</span
                      >
                    </div>

                    <div class="tel-learning-card__certificate-link-row">
                      <a
                        href="https://en.wikipedia.org/wiki/Certificate"
                        class="tel-learning-card__download-link"
                        >Download Certificate</a
                      >
                    </div>
                  </div>
                </div>

                <div
                  class="tel-learning-card__action-icon tel-learning-card__action-icon--green"
                >
                  <svg
                    class="certificate-icon certificate-icon--green"
                    id="Layer_1"
                    data-name="Layer 1"
                    xmlns="http://www.w3.org/2000/svg"
                    xmlns:xlink="http://www.w3.org/1999/xlink"
                    viewBox="0 0 38 48"
                  >
                    <g class="cls-6">
                      <g>
                        <path
                          class="cls-2"
                          d="M27.57,37.95v8.43c0,.45-1.22.67-1.87.33l-5.7-2.95c-.44-.22-1.2-.22-1.63.01l-5.16,2.86c-.64.35-1.9.15-1.9-.32v-11.1"
                        />
                        <path
                          class="cls-5"
                          d="M36.92,18.17c0,1.25-2.26,2.23-2.53,3.41s1.33,3.08.8,4.17-3,1.01-3.77,1.97c-.76.96-.13,3.34-1.09,4.1-.96.77-3.14-.39-4.25.15-1.11.54-1.55,2.95-2.76,3.23-1.21.27-2.64-1.71-3.89-1.71s-2.72,1.98-3.89,1.71c-1.17-.27-1.67-2.7-2.76-3.23-1.1-.52-3.29.61-4.25-.15-.96-.76-.32-3.14-1.09-4.1-.77-.96-3.23-.86-3.76-1.97-.53-1.11,1.08-2.96.8-4.17-.27-1.21-2.53-2.15-2.53-3.41s2.26-2.23,2.53-3.41c.27-1.18-1.33-3.08-.8-4.17.53-1.09,3-1.01,3.77-1.97.76-.96.13-3.34,1.09-4.1.96-.77,3.14.39,4.25-.15,1.11-.54,1.55-2.95,2.76-3.23,1.21-.27,2.64,1.71,3.89,1.71s2.72-1.98,3.89-1.71c1.17.27,1.67,2.7,2.76,3.23,1.1.52,3.29-.61,4.25.15.96.76.32,3.14,1.09,4.1.77.96,3.23.86,3.76,1.97.53,1.11-1.08,2.96-.8,4.17.27,1.21,2.53,2.15,2.53,3.41Z"
                        />
                        <path
                          class="cls-2"
                          d="M36.92,18.17c0,1.25-2.26,2.23-2.53,3.41s1.33,3.08.8,4.17-3,1.01-3.77,1.97c-.76.96-.13,3.34-1.09,4.1-.96.77-3.14-.39-4.25.15-1.11.54-1.55,2.95-2.76,3.23-1.21.27-2.64-1.71-3.89-1.71s-2.72,1.98-3.89,1.71c-1.17-.27-1.67-2.7-2.76-3.23-1.1-.52-3.29.61-4.25-.15-.96-.76-.32-3.14-1.09-4.1-.77-.96-3.23-.86-3.76-1.97-.53-1.11,1.08-2.96.8-4.17-.27-1.21-2.53-2.15-2.53-3.41s2.26-2.23,2.53-3.41c.27-1.18-1.33-3.08-.8-4.17.53-1.09,3-1.01,3.77-1.97.76-.96.13-3.34,1.09-4.1.96-.77,3.14.39,4.25-.15,1.11-.54,1.55-2.95,2.76-3.23,1.21-.27,2.64,1.71,3.89,1.71s2.72-1.98,3.89-1.71c1.17.27,1.67,2.7,2.76,3.23,1.1.52,3.29-.61,4.25.15.96.76.32,3.14,1.09,4.1.77.96,3.23.86,3.76,1.97.53,1.11-1.08,2.96-.8,4.17.27,1.21,2.53,2.15,2.53,3.41Z"
                        />
                        <path
                          class="cls-4"
                          d="M19.3,26.58l-8.59-10.51,3.72-5.52h10.31l3.44,5.52-8.88,10.51Z"
                        />
                        <path
                          class="cls-4"
                          d="M19.39,26.58l-3.95-10.51,1.71-5.52h4.73l1.58,5.52-4.07,10.51Z"
                        />
                        <path class="cls-3" d="M11.08,15.99h14.04" />
                      </g>
                    </g>
                  </svg>
                </div>
              </div>
            </div>
          </div>
        </div>

        <div class="tel-learning-card__footer">
          <div class="tel-learning-card__developed-with">
            Developed with elearning for healthcare
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Nunjucks macro options

Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.

Some options are required for the macro to work; these are marked as "Required" in the option description.

If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.

{% from 'tel/components/learning-card/macro.njk' import telLearningCard %}

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    {{ telLearningCard({
      showAsCard: true,
      headingLevel: 3,
      heading: "Infection Prevention and Control - Level 2",
      description: "Standard precautions and best practices for clinical healthcare workers across hospital settings.",
      type: "Course",
      activitiesCompleted: 8,
      totalActivities: 8,
      numberOfCertificates: 1,
      awardedCertificates: [
        {
          awardedDate: "12/7/2026",
          certificateLink: "https://en.wikipedia.org/wiki/Certificate"
        }
      ],
      developedWith: "Developed with elearning for healthcare"
    }) }}
  </div>
</div>

Multiple certificates card

Used when a course or learning activity has multiple associated certificates awarded across different completion stages, displaying individual award names, dates, and download links.

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    <div class="nhsuk-card tel-learning-card tel-learning-card--learning-card">
      <div class="nhsuk-card__content">
        <div class="tel-learning-card__heading">
          <a href="#" class="tel-learning-card__heading-link">
            <h3 class="tel-learning-card__heading-text">
              Infection Prevention and Control - Level 2
            </h3>
          </a>
        </div>

        <div class="tel-learning-card__content">
          <div class="tel-learning-card__description">
            <p>
              Standard precautions and best practices for clinical healthcare
              workers across hospital settings.
            </p>
          </div>

          <div class="tel-learning-card__key-activity-information">
            <div class="tel-learning-card__key-info--completed-container">
              <div class="tel-learning-card__key-info__container">
                <div class="tel-learning-card__key-info__information">
                  <dl
                    class="nhsuk-summary-list nhsuk-summary-list--no-border tel-learning-card__summary-list"
                  >
                    <div class="nhsuk-summary-list__row">
                      <dt class="nhsuk-summary-list__key">Type:</dt>
                      <dd class="nhsuk-summary-list__value">Course</dd>
                    </div>
                  </dl>
                </div>

                <div class="tel-learning-card__key-info__status">
                  <strong class="nhsuk-tag nhsuk-tag--green">
                    Completed
                  </strong>
                </div>
              </div>

              <div class="tel-learning-card__awarded-section-wrapper">
                <div class="tel-learning-card__awarded-content">
                  <div class="tel-learning-card__awarded-item">
                    <div class="tel-learning-card__certificate-name-row">
                      <span class="nhsuk-u-font-weight-bold">Name:</span>
                      <span class="tel-learning-card__awarded-name-text"
                        >Stage 1</span
                      >
                    </div>

                    <div class="tel-learning-card__awarded-date-row">
                      <span class="nhsuk-u-font-weight-bold">Awarded:</span>
                      <span class="tel-learning-card__awarded-date-text"
                        >9/7/2026</span
                      >
                    </div>

                    <div class="tel-learning-card__certificate-link-row">
                      <a
                        href="https://en.wikipedia.org/wiki/Certificate"
                        class="tel-learning-card__download-link"
                        >Download Certificate</a
                      >
                    </div>
                  </div>

                  <div class="tel-learning-card__awarded-item">
                    <div class="tel-learning-card__certificate-name-row">
                      <span class="nhsuk-u-font-weight-bold">Name:</span>
                      <span class="tel-learning-card__awarded-name-text"
                        >Stage 2</span
                      >
                    </div>

                    <div class="tel-learning-card__awarded-date-row">
                      <span class="nhsuk-u-font-weight-bold">Awarded:</span>
                      <span class="tel-learning-card__awarded-date-text"
                        >10/7/2026</span
                      >
                    </div>

                    <div class="tel-learning-card__certificate-link-row">
                      <a
                        href="https://en.wikipedia.org/wiki/Certificate"
                        class="tel-learning-card__download-link"
                        >Download Certificate</a
                      >
                    </div>
                  </div>

                  <div class="tel-learning-card__awarded-item">
                    <div class="tel-learning-card__certificate-name-row">
                      <span class="nhsuk-u-font-weight-bold">Name:</span>
                      <span class="tel-learning-card__awarded-name-text"
                        >Stage 3</span
                      >
                    </div>

                    <div class="tel-learning-card__awarded-date-row">
                      <span class="nhsuk-u-font-weight-bold">Awarded:</span>
                      <span class="tel-learning-card__awarded-date-text"
                        >12/7/2026</span
                      >
                    </div>

                    <div class="tel-learning-card__certificate-link-row">
                      <a
                        href="https://en.wikipedia.org/wiki/Certificate"
                        class="tel-learning-card__download-link"
                        >Download Certificate</a
                      >
                    </div>
                  </div>
                </div>

                <div
                  class="tel-learning-card__action-icon tel-learning-card__action-icon--green"
                >
                  <svg
                    class="certificate-icon certificate-icon--green"
                    id="Layer_1"
                    data-name="Layer 1"
                    xmlns="http://www.w3.org/2000/svg"
                    xmlns:xlink="http://www.w3.org/1999/xlink"
                    viewBox="0 0 38 48"
                  >
                    <g class="cls-6">
                      <g>
                        <path
                          class="cls-2"
                          d="M27.57,37.95v8.43c0,.45-1.22.67-1.87.33l-5.7-2.95c-.44-.22-1.2-.22-1.63.01l-5.16,2.86c-.64.35-1.9.15-1.9-.32v-11.1"
                        />
                        <path
                          class="cls-5"
                          d="M36.92,18.17c0,1.25-2.26,2.23-2.53,3.41s1.33,3.08.8,4.17-3,1.01-3.77,1.97c-.76.96-.13,3.34-1.09,4.1-.96.77-3.14-.39-4.25.15-1.11.54-1.55,2.95-2.76,3.23-1.21.27-2.64-1.71-3.89-1.71s-2.72,1.98-3.89,1.71c-1.17-.27-1.67-2.7-2.76-3.23-1.1-.52-3.29.61-4.25-.15-.96-.76-.32-3.14-1.09-4.1-.77-.96-3.23-.86-3.76-1.97-.53-1.11,1.08-2.96.8-4.17-.27-1.21-2.53-2.15-2.53-3.41s2.26-2.23,2.53-3.41c.27-1.18-1.33-3.08-.8-4.17.53-1.09,3-1.01,3.77-1.97.76-.96.13-3.34,1.09-4.1.96-.77,3.14.39,4.25-.15,1.11-.54,1.55-2.95,2.76-3.23,1.21-.27,2.64,1.71,3.89,1.71s2.72-1.98,3.89-1.71c1.17.27,1.67,2.7,2.76,3.23,1.1.52,3.29-.61,4.25.15.96.76.32,3.14,1.09,4.1.77.96,3.23.86,3.76,1.97.53,1.11-1.08,2.96-.8,4.17.27,1.21,2.53,2.15,2.53,3.41Z"
                        />
                        <path
                          class="cls-2"
                          d="M36.92,18.17c0,1.25-2.26,2.23-2.53,3.41s1.33,3.08.8,4.17-3,1.01-3.77,1.97c-.76.96-.13,3.34-1.09,4.1-.96.77-3.14-.39-4.25.15-1.11.54-1.55,2.95-2.76,3.23-1.21.27-2.64-1.71-3.89-1.71s-2.72,1.98-3.89,1.71c-1.17-.27-1.67-2.7-2.76-3.23-1.1-.52-3.29.61-4.25-.15-.96-.76-.32-3.14-1.09-4.1-.77-.96-3.23-.86-3.76-1.97-.53-1.11,1.08-2.96.8-4.17-.27-1.21-2.53-2.15-2.53-3.41s2.26-2.23,2.53-3.41c.27-1.18-1.33-3.08-.8-4.17.53-1.09,3-1.01,3.77-1.97.76-.96.13-3.34,1.09-4.1.96-.77,3.14.39,4.25-.15,1.11-.54,1.55-2.95,2.76-3.23,1.21-.27,2.64,1.71,3.89,1.71s2.72-1.98,3.89-1.71c1.17.27,1.67,2.7,2.76,3.23,1.1.52,3.29-.61,4.25.15.96.76.32,3.14,1.09,4.1.77.96,3.23.86,3.76,1.97.53,1.11-1.08,2.96-.8,4.17.27,1.21,2.53,2.15,2.53,3.41Z"
                        />
                        <path
                          class="cls-4"
                          d="M19.3,26.58l-8.59-10.51,3.72-5.52h10.31l3.44,5.52-8.88,10.51Z"
                        />
                        <path
                          class="cls-4"
                          d="M19.39,26.58l-3.95-10.51,1.71-5.52h4.73l1.58,5.52-4.07,10.51Z"
                        />
                        <path class="cls-3" d="M11.08,15.99h14.04" />
                      </g>
                    </g>
                  </svg>
                </div>
              </div>
            </div>
          </div>
        </div>

        <div class="tel-learning-card__footer">
          <div class="tel-learning-card__developed-with">
            Developed with elearning for healthcare
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Nunjucks macro options

Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.

Some options are required for the macro to work; these are marked as "Required" in the option description.

If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.

{% from 'tel/components/learning-card/macro.njk' import telLearningCard %}

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    {{ telLearningCard({
      showAsCard: true,
      headingLevel: 3,
      heading: "Infection Prevention and Control - Level 2",
      description: "Standard precautions and best practices for clinical healthcare workers across hospital settings.",
      type: "Course",
      activitiesCompleted: 8,
      totalActivities: 8,
      numberOfCertificates: 1,
      awardedCertificates: [
        {
          certificateName: "Stage 1",
          awardedDate: "9/7/2026",
          certificateLink: "https://en.wikipedia.org/wiki/Certificate"
        },
        {
          certificateName: "Stage 2",
          awardedDate: "10/7/2026",
          certificateLink: "https://en.wikipedia.org/wiki/Certificate"
        },
        {
          certificateName: "Stage 3",
          awardedDate: "12/7/2026",
          certificateLink: "https://en.wikipedia.org/wiki/Certificate"
        }
      ],
      developedWith: "Developed with elearning for healthcare"
    }) }}
  </div>
</div>

Catalogue card

Used for promotional or high-visibility listings. It incorporates a hero banner image, optional publisher/catalogue branding, and dedicated metadata footers.

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    <div class="nhsuk-card tel-learning-card tel-learning-card--learning-card">
      <img
        class="nhsuk-card__img"
        src="https://assets.nhs.uk/prod/images/A_0218_exercise-main_FKW1X7.width-690.jpg"
        alt="Card image alt text"
      />

      <div class="nhsuk-card__content">
        <div class="tel-learning-card__heading">
          <a href="#" class="tel-learning-card__heading-link">
            <h3 class="tel-learning-card__heading-text">
              Infection Prevention and Control - Level 2
            </h3>
          </a>
        </div>

        <div class="tel-learning-card__content">
          <div class="tel-learning-card__description">
            <p>
              Standard precautions and best practices for clinical healthcare
              workers across hospital settings.
            </p>
          </div>
        </div>

        <div class="tel-learning-card__footer">
          <div class="tel-learning-card__catalogue">
            <img
              src="https://picsum.photos/100"
              alt=""
              class="tel-learning-card__catalogue-image"
            />

            <a href="#" class="tel-learning-card__catalogue-link">
              Enabling Effective Learning
            </a>
          </div>

          <div class="tel-learning-card__developed-with">
            Developed with elearning for healthcare
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Nunjucks macro options

Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.

Some options are required for the macro to work; these are marked as "Required" in the option description.

If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.

{% from 'tel/components/learning-card/macro.njk' import telLearningCard %}

<div class="nhsuk-grid-row">
  <div class="nhsuk-grid-column-full tel-max-width--400">
    {{ telLearningCard({
      showAsCard: true,
      image: {
        src: "https://assets.nhs.uk/prod/images/A_0218_exercise-main_FKW1X7.width-690.jpg",
        alt: "Card image alt text",
        caption: "test caption text"
      },
      headingLevel: 3,
      heading: "Infection Prevention and Control - Level 2",
      description: "Standard precautions and best practices for clinical healthcare workers across hospital settings.",
      catalogueImage: "https://picsum.photos/100",
      catalogueLinkUrl: "#",
      catalogueLinkText: "Enabling Effective Learning",
      developedWith: "Developed with elearning for healthcare"
    }) }}
  </div>
</div>

Learning cards in a grid (Layout example)

Demonstrates three individual learning cards placed side-by-side in a typical 3-column responsive NHS grid layout. Note that the learning card component itself renders a single card—there is no macro parameter to generate a multi-card grid automatically. To achieve this layout, call telLearningCard separately within standard nhsuk-grid-column-* wrappers (optionally adding nhsuk-grid-row--equal-heights to align card heights across the row).

<div class="nhsuk-grid-row nhsuk-grid-row--equal-heights">
  <div class="nhsuk-grid-column-one-third">
    <div class="nhsuk-card tel-learning-card tel-learning-card--learning-card">
      <div class="nhsuk-card__content">
        <div class="tel-learning-card__heading">
          <a href="#" class="tel-learning-card__heading-link">
            <h3 class="tel-learning-card__heading-text">
              Infection Prevention and Control - Level 2
            </h3>
          </a>
        </div>

        <div class="tel-learning-card__content">
          <div class="tel-learning-card__description">
            <p>
              Standard precautions and best practices for clinical healthcare
              workers across hospital settings.
            </p>
          </div>

          <div class="tel-learning-card__rating">
            <div class="tel-rating tel-rating--star">
              <div class="tel-rating__container">
                <div class="tel-rating__progress">
                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <svg
                    viewBox="0 0 576 512"
                    width="100"
                    class="tel-rating__star-icon"
                    aria-hidden="true"
                  >
                    <path
                      d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"
                    />
                  </svg>

                  <div class="tel-rating__cover" style="width: 10%"></div>
                </div>
              </div>

              <div class="tel-rating__description">
                4.5 out of 5

                <span class="tel-rating__link">45 ratings</span>
              </div>
            </div>
          </div>
        </div>

        <div class="tel-learning-card__footer">
          <div class="tel-learning-card__developed-with">
            Developed with elearning for healthcare
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="nhsuk-grid-column-one-third">
    <div class="nhsuk-card tel-learning-card tel-learning-card--learning-card">
      <div class="nhsuk-card__content">
        <div class="tel-learning-card__heading">
          <a href="#" class="tel-learning-card__heading-link">
            <h3 class="tel-learning-card__heading-text">
              Safeguarding Adults - Level 1
            </h3>
          </a>
        </div>

        <div class="tel-learning-card__content">
          <div class="tel-learning-card__description">
            <p>
              Essential awareness training covering indicators of abuse and
              reporting pathways.
            </p>
          </div>

          <div class="tel-learning-card__key-activity-information">
            <div class="tel-learning-card__in-progress-container">
              <div class="tel-learning-card__key-info__information">
                <dl
                  class="nhsuk-summary-list nhsuk-summary-list--no-border tel-learning-card__summary-list"
                >
                  <div class="nhsuk-summary-list__row">
                    <dt class="nhsuk-summary-list__key">Type:</dt>
                    <dd class="nhsuk-summary-list__value">Course</dd>
                  </div>

                  <div class="nhsuk-summary-list__row">
                    <dt class="nhsuk-summary-list__key">Accessed:</dt>
                    <dd class="nhsuk-summary-list__value">14 Oct 2026</dd>
                  </div>
                </dl>
              </div>

              <div class="tel-learning-card__key-info__status">
                <strong class="nhsuk-tag nhsuk-tag--blue"> In progress </strong>
              </div>
            </div>

            <div class="tel-progress-bar">
              <div class="tel-progress-bar__track">
                <div class="tel-progress-bar__fill" style="width: 38%"></div>
              </div>
              <div class="tel-progress-bar__text">
                3 of 8 activities completed
              </div>
            </div>

            <div class="tel-learning-card__detailed-summary-wrapper">
              <div class="tel-learning-card__detailed-summary-content">
                <dl
                  class="nhsuk-summary-list nhsuk-summary-list--no-border tel-learning-card__summary-list tel-learning-card__summary-list--compact"
                >
                  <div class="nhsuk-summary-list__row">
                    <dt class="nhsuk-summary-list__key">Includes</dt>
                    <dd class="nhsuk-summary-list__value">8 activities</dd>
                  </div>
                </dl>
              </div>
            </div>
          </div>
        </div>

        <div class="tel-learning-card__footer">
          <div class="tel-learning-card__developed-with">
            Developed with elearning for healthcare
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="nhsuk-grid-column-one-third">
    <div class="nhsuk-card tel-learning-card tel-learning-card--learning-card">
      <div class="nhsuk-card__content">
        <div class="tel-learning-card__heading">
          <a href="#" class="tel-learning-card__heading-link">
            <h3 class="tel-learning-card__heading-text">
              Information Governance Refresh 2026
            </h3>
          </a>
        </div>

        <div class="tel-learning-card__content">
          <div class="tel-learning-card__description">
            <p>
              Data protection guidelines, GDPR compliance, and managing patient
              records safely.
            </p>
          </div>

          <div class="tel-learning-card__key-activity-information">
            <div class="tel-learning-card__key-info--completed-container">
              <div class="tel-learning-card__key-info__container">
                <div class="tel-learning-card__key-info__information">
                  <dl
                    class="nhsuk-summary-list nhsuk-summary-list--no-border tel-learning-card__summary-list"
                  >
                    <div class="nhsuk-summary-list__row">
                      <dt class="nhsuk-summary-list__key">Type:</dt>
                      <dd class="nhsuk-summary-list__value">Course</dd>
                    </div>
                  </dl>
                </div>

                <div class="tel-learning-card__key-info__status">
                  <strong class="nhsuk-tag nhsuk-tag--green">
                    Completed
                  </strong>
                </div>
              </div>

              <div class="tel-learning-card__awarded-section-wrapper">
                <div class="tel-learning-card__awarded-content"></div>
              </div>
            </div>
          </div>
        </div>

        <div class="tel-learning-card__footer">
          <div class="tel-learning-card__developed-with">
            Developed with elearning for healthcare
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Nunjucks macro options

Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.

Some options are required for the macro to work; these are marked as "Required" in the option description.

If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.

{% from 'tel/components/learning-card/macro.njk' import telLearningCard %}

<div class="nhsuk-grid-row nhsuk-grid-row--equal-heights">
  <div class="nhsuk-grid-column-one-third">
    {{ telLearningCard({
      showAsCard: true,
      headingLevel: 3,
      heading: "Infection Prevention and Control - Level 2",
      description: "Standard precautions and best practices for clinical healthcare workers across hospital settings.",
      type: "Course",
      starRating: 90,
      ratingCount: 45,
      totalActivities: 7,
      numberOfCertificates: 1,
      developedWith: "Developed with elearning for healthcare"
    }) }}
  </div>

  <div class="nhsuk-grid-column-one-third">
    {{ telLearningCard({
      showAsCard: true,
      headingLevel: 3,
      heading: "Safeguarding Adults - Level 1",
      description: "Essential awareness training covering indicators of abuse and reporting pathways.",
      type: "Course",
      activitiesCompleted: 3,
      totalActivities: 8,
      lastAccessed: "14 Oct 2026",
      developedWith: "Developed with elearning for healthcare"
    }) }}
  </div>

  <div class="nhsuk-grid-column-one-third">
    {{ telLearningCard({
      showAsCard: true,
      headingLevel: 3,
      heading: "Information Governance Refresh 2026",
      description: "Data protection guidelines, GDPR compliance, and managing patient records safely.",
      type: "Course",
      numberOfCertificates: 1,
      activitiesCompleted: 8,
      totalActivities: 8,
      awardedDate: "22 Jan 2026",
      developedWith: "Developed with elearning for healthcare"
    }) }}
  </div>
</div>