# Tier block

> One membership tier's items in a catalog: the tier name, one lead line and the items, with a tier-colour line down the left.

- Block class: `.hs-tier-block`
- CSS: `components/tier-block.css` (also inside https://brand.honorsociety.org/brand.css)
- JS: none
- Status: built, open to change
- Variants: Tier blocks, Free block
- HTML page: https://brand.honorsociety.org/components/tier-block/

## What it is

A group of catalog items that one membership tier unlocks. It opens with the tier name as an `h2` and one lead line, then the items. A 4px line in the tier colour runs down the whole block, left of the content column, and fades in and out at its ends. The items keep the full column width.

## When to use

- A catalog grouped by membership tier, highest first, such as the tiers band on `/benefits`.
- The Free group of the same catalog, so it reads like a tier.

## When not to use

- A band with one heading over one list: use the [Band](/components/band/) head.
- The name of a member's tier on its own: use the [Tier badge](/components/tier-badge/).
- Tiers side by side to compare: use [Plan compare](/components/plan-compare/).

## Rules

- Markup: `div.hs-tier-block.hs-tier-block--{tier}` > `div.hs-tier-block__head` (`h2.hs-heading.hs-heading--h2`, then an optional `p.hs-tier-block__lead`), then a `ul.hs-card-grid.hs-card-grid--3` of `--tile` cards.
- Modifiers: `--free`, `--bronze`, `--silver`, `--gold`, `--signature`. Each sets the line colour: `--hs-action-gold`, `--hs-tier-bronze`, `--hs-tier-silver-line`, `--hs-tier-gold-line`, `--hs-tier-signature`.
- Put the blocks straight in the band's `.hs-container`, highest tier first. The band needs no heading of its own: give the `section` an `aria-label` ("Benefits by membership tier").
- The `h2` is the tier name alone. No gold rule under it: the line groups the head and the items.
- The lead says what the tier adds to the tiers below it: "These 3 benefits, plus every Silver and Bronze benefit below." One benefit: "This benefit, plus every Gold, Silver and Bronze benefit below." Name only lower tiers that have items, highest first, with "and" before the last. The lowest shown tier has no lead.
- The Free block has no lead.
- Blocks sit 64px apart. A filter may hide a block with `hidden`; the first shown block then starts at the band's padding.
- A soft band of tier blocks right after another (the Free band, then the tiers band) takes no top padding, so the two read as one ground.
- Build the lead in code from the counts. A script that filters the page rebuilds it with the same words.

## Accessibility

- The `h2` names the tier, so the line colour is decorative and carries no meaning alone.
- Line contrast on soft: bronze 5.5:1, silver line 3.0:1, gold line 2.5:1, signature 13.8:1, Free (action gold) 1.1:1. Lead ink on soft 12.2:1.
- The item grid takes `aria-labelledby` with the `h2` id.

## Variants

### Tier blocks

Highest tier first, on a soft band. Bronze is the lowest shown tier, so it has no lead.

```html
<section class="hs-band hs-band--soft" data-section="tiers" aria-label="Benefits by membership tier">
  <div class="hs-container">
    <div class="hs-tier-block hs-tier-block--gold">
      <div class="hs-tier-block__head">
        <h2 class="hs-heading hs-heading--h2" id="tb-gold">Gold</h2>
        <p class="hs-tier-block__lead">This benefit, plus every Silver and Bronze benefit below.</p>
      </div>
      <ul class="hs-card-grid hs-card-grid--3" aria-labelledby="tb-gold">
        <li><a class="hs-card hs-card--link hs-card--tile is-locked" href="/benefits-coupons/example-gym" data-ph-capture-attribute-cta="benefit" data-ph-capture-attribute-cta-loc="benefits-card"><div class="hs-card__cover"><img src="/placeholders/card.svg" width="400" height="300" alt="" loading="lazy" decoding="async"></div><h3 class="hs-card__title">Example Gym: six months free</h3><div class="hs-card__foot"><span class="hs-tier-badge hs-tier-badge--gold"><svg class="hs-card__status-icon" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M6 11h12v9H6z M8.5 11V8a3.5 3.5 0 0 1 7 0v3"/></svg><span aria-hidden="true">Gold</span><span class="hs-visually-hidden">Needs Gold</span></span><p class="hs-card__meta">Recreation</p></div></a></li>
      </ul>
    </div>
    <div class="hs-tier-block hs-tier-block--silver">
      <div class="hs-tier-block__head">
        <h2 class="hs-heading hs-heading--h2" id="tb-silver">Silver</h2>
        <p class="hs-tier-block__lead">This benefit, plus every Bronze benefit below.</p>
      </div>
      <ul class="hs-card-grid hs-card-grid--3" aria-labelledby="tb-silver">
        <li><a class="hs-card hs-card--link hs-card--tile is-locked" href="/benefits-coupons/example-roadside" data-ph-capture-attribute-cta="benefit" data-ph-capture-attribute-cta-loc="benefits-card"><div class="hs-card__cover"><img src="/placeholders/card.svg" width="400" height="300" alt="" loading="lazy" decoding="async"></div><h3 class="hs-card__title">Example Roadside Assistance</h3><div class="hs-card__foot"><span class="hs-tier-badge hs-tier-badge--silver"><svg class="hs-card__status-icon" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M6 11h12v9H6z M8.5 11V8a3.5 3.5 0 0 1 7 0v3"/></svg><span aria-hidden="true">Silver</span><span class="hs-visually-hidden">Needs Silver</span></span><p class="hs-card__meta">Travel</p></div></a></li>
      </ul>
    </div>
    <div class="hs-tier-block hs-tier-block--bronze">
      <div class="hs-tier-block__head">
        <h2 class="hs-heading hs-heading--h2" id="tb-bronze">Bronze</h2>
      </div>
      <ul class="hs-card-grid hs-card-grid--3" aria-labelledby="tb-bronze">
        <li><a class="hs-card hs-card--link hs-card--tile" href="/benefits-coupons/example-learning-co" data-ph-capture-attribute-cta="benefit" data-ph-capture-attribute-cta-loc="benefits-card"><div class="hs-card__cover"><img src="/placeholders/card.svg" width="400" height="300" alt="" loading="lazy" decoding="async"></div><h3 class="hs-card__title">Example Learning Co. test prep discount</h3><div class="hs-card__foot"><span class="hs-tier-badge hs-tier-badge--bronze">Bronze</span><span class="hs-status hs-status--open"><svg class="hs-card__status-icon" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg><span aria-hidden="true">Included</span><span class="hs-visually-hidden">Included in your membership</span></span><p class="hs-card__meta">Test prep</p></div></a></li>
      </ul>
    </div>
  </div>
</section>
```

### Free block

The Free group reads like a tier: the same head with no lead, and an action-gold line.

```html
<section class="hs-band hs-band--soft" data-section="free" aria-labelledby="tb-free">
  <div class="hs-container">
    <div class="hs-tier-block hs-tier-block--free">
      <div class="hs-tier-block__head">
        <h2 class="hs-heading hs-heading--h2" id="tb-free">Free benefits</h2>
      </div>
      <ul class="hs-card-grid hs-card-grid--3" aria-labelledby="tb-free">
        <li><a class="hs-card hs-card--link hs-card--tile" href="/scholarships" data-ph-capture-attribute-cta="scholarships" data-ph-capture-attribute-cta-loc="benefits-card"><div class="hs-card__cover"><img src="/placeholders/card.svg" width="400" height="300" alt="" loading="lazy" decoding="async"></div><h3 class="hs-card__title">Example Study Abroad Scholarship</h3><div class="hs-card__foot"><span class="hs-tier-badge hs-tier-badge--free">Free</span><p class="hs-card__meta">Education</p></div></a></li>
        <li><a class="hs-card hs-card--link hs-card--tile" href="/benefits-coupons/example-mentorship" data-ph-capture-attribute-cta="benefit" data-ph-capture-attribute-cta-loc="benefits-card"><div class="hs-card__cover"><img src="/placeholders/card.svg" width="400" height="300" alt="" loading="lazy" decoding="async"></div><h3 class="hs-card__title">Example Mentorship Program</h3><div class="hs-card__foot"><span class="hs-tier-badge hs-tier-badge--free">Free account</span><p class="hs-card__meta">Careers</p></div></a></li>
      </ul>
    </div>
  </div>
</section>
```
