kitbash Sign in Connect agent
Components

Services list

Services as a grey list with the current one marked by a sliding block and set in ink, its description crossfading in the right half, and a contact list below. Hover inks an item, a click moves the block.

Part of the style

Heat Reel

6 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --ink: #07150a;
  --ink-soft: #685f50;
  --paper: #9d9485;
  --night: #d6e9d9;
  --night-ink: #6d6557;
  --night-soft: #6a6152;
  --film: #020d04;
  --clay-deep: #152318;
  --bone: #8b8273;
  --ember: #2d9148;
  --clay: #4c8557;
  --ember-hot: #609069;
  --glaze: #19532d;
  --sage: #2d9148;
  --lagoon: #1b4a27;
}
</style>

<section class="services" aria-label="Studio">
  <h2 class="services__label">Services</h2>
  <ul class="services__list" role="tablist" aria-label="Services">
    <li><button class="services__item is-current" type="button" role="tab" aria-selected="true" aria-controls="services-copy-1" id="services-tab-1"><span class="services__marker" aria-hidden="true"></span>Treatment</button></li>
    <li><button class="services__item" type="button" role="tab" aria-selected="false" aria-controls="services-copy-2" id="services-tab-2" tabindex="-1"><span class="services__marker" aria-hidden="true"></span>Direction</button></li>
    <li><button class="services__item" type="button" role="tab" aria-selected="false" aria-controls="services-copy-3" id="services-tab-3" tabindex="-1"><span class="services__marker" aria-hidden="true"></span>Production</button></li>
    <li><button class="services__item" type="button" role="tab" aria-selected="false" aria-controls="services-copy-4" id="services-tab-4" tabindex="-1"><span class="services__marker" aria-hidden="true"></span>Grade + Sound</button></li>
    <li><button class="services__item" type="button" role="tab" aria-selected="false" aria-controls="services-copy-5" id="services-tab-5" tabindex="-1"><span class="services__marker" aria-hidden="true"></span>Archive + Licensing</button></li>
  </ul>
  <div class="services__copy">
    <p class="services__text is-current" role="tabpanel" id="services-copy-1" aria-labelledby="services-tab-1">Every film starts at the bench, not the camera. We spend a working day in the shop before we write a line, learning where the heat comes from, who does what and which sounds belong to the place. The treatment that follows is short, specific and built around the work itself.</p>
    <p class="services__text" role="tabpanel" id="services-copy-2" aria-labelledby="services-tab-2" hidden>We direct for patience. Long takes, natural light and hands doing what they do every day; nobody performs for us. A director stays with the film from the first visit to the final grade, so the voice of the piece never changes hands.</p>
    <p class="services__text" role="tabpanel" id="services-copy-3" aria-labelledby="services-tab-3" hidden>A small crew of three to six, chosen for the room. We plan around firing schedules and pour days, carry our own safety kit for hot shops and leave the floor exactly as we found it, swept.</p>
    <p class="services__text" role="tabpanel" id="services-copy-4" aria-labelledby="services-tab-4" hidden>Edit, grade and sound happen in house. We cut to the rhythm of the craft, grade for the colour of heat rather than for a look, and record every room for an hour of silence so the quiet parts sound true.</p>
    <p class="services__text" role="tabpanel" id="services-copy-5" aria-labelledby="services-tab-5" hidden>Every shoot ends as a library: loops, stills and stems named, tagged and delivered so the workshop can use them for years. We keep a mirror of it and license selects back to the maker, never to anyone else.</p>
  </div>

  <h2 class="services__label services__label--contact">Contact</h2>
  <ul class="services__list services__list--contact">
    <li><a class="services__link" href="#">Email</a></li>
    <li><a class="services__link" href="#">Vimeo</a></li>
    <li><a class="services__link" href="#">Letters</a></li>
  </ul>
</section>

<style>
  .services {
    --services-col: calc((100cqw - 11 * var(--gutter)) / 12);
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    row-gap: var(--space-l);
    align-items: start;
    padding: var(--space-l) var(--edge);
    background: var(--paper);
    color: var(--ink);
    line-height: var(--leading-list);
  }
  .services__label {
    grid-column: 1 / 3;
    margin: 0;
    font: inherit;
    font-stretch: inherit;
    text-align: right;
  }
  .services__list {
    grid-column: 3 / 7;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .services__item,
  .services__link {
    display: flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink-soft);
    font: inherit;
    font-stretch: inherit;
    text-transform: inherit;
    text-align: left;
    text-decoration: none;
    line-height: var(--leading-list);
    cursor: pointer;
    transition: color var(--time-hover) var(--ease-snap);
  }
  .services__item.is-current { color: var(--ink); cursor: default; }
  @media (hover: hover) {
    .services__item:hover,
    .services__link:hover { color: var(--ink); }
  }
  /* Tight lists: focus is a heavy underline, so the ring never covers the next line. */
  .services__item:focus-visible,
  .services__link:focus-visible {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    outline: none;
  }
  .services__marker {
    flex: none;
    width: 0;
    height: var(--marker-h);
    margin-right: 0;
    background: var(--ink);
    transition: width var(--time-fade) var(--ease-snap), margin-right var(--time-fade) var(--ease-snap);
  }
  .services__item.is-current .services__marker {
    width: var(--marker-w);
    margin-right: 4px;
  }

  .services__copy {
    grid-column: 7 / 11;
    display: grid;
  }
  .services__text {
    grid-area: 1 / 1;
    margin: 0;
    opacity: 0;
    transition: opacity var(--time-swap) var(--ease-glide);
    text-wrap: pretty;
  }
  .services__text[hidden] { display: block; visibility: hidden; }
  .services__text.is-current { opacity: 1; }

  .services__label--contact { grid-row: 2; }
  .services__list--contact { grid-row: 2; }

  @media (max-width: 54.6rem) {
    .services {
      grid-template-columns: max-content minmax(0, 1fr);
      row-gap: var(--space-m);
      column-gap: var(--space-m);
    }
    .services__label { grid-column: 1; text-align: left; padding-top: 14px; }
    .services__list { grid-column: 2; }
    .services__copy { grid-column: 1 / -1; grid-row: 2; }
    .services__label--contact,
    .services__list--contact { grid-row: 3; }
  }
  /* Touch: list rows grow to a finger's height. */
  @media (pointer: coarse), (max-width: 54.6rem) {
    .services__item,
    .services__link { min-height: var(--tap); min-width: var(--tap); }
  }
</style>

<script>
(() => {
  function select(root, tab, focus) {
    const tabs = [...root.querySelectorAll('.services__item')];
    for (const other of tabs) {
      const on = other === tab;
      other.classList.toggle('is-current', on);
      other.setAttribute('aria-selected', String(on));
      other.tabIndex = on ? 0 : -1;
      const panel = root.querySelector(`#${other.getAttribute('aria-controls')}`);
      panel.classList.toggle('is-current', on);
      panel.hidden = !on;
    }
    if (focus) tab.focus();
  }

  for (const root of document.querySelectorAll('.services')) {
    const tabs = [...root.querySelectorAll('.services__item')];
    tabs.forEach((tab, i) => {
      tab.addEventListener('click', () => select(root, tab, false));
      tab.addEventListener('keydown', (event) => {
        const step = { ArrowDown: 1, ArrowRight: 1, ArrowUp: -1, ArrowLeft: -1 }[event.key];
        if (!step) return;
        event.preventDefault();
        select(root, tabs[(i + step + tabs.length) % tabs.length], true);
      });
    });
  }
})();
</script>

Similar components

Ringed services

Ringed services

Numbered services

Numbered services

Ruled lists

Ruled lists

Service rows and cards

Service rows and cards

Capability rows

Capability rows

Ledger

Ledger

Ruled trade list

Ruled trade list

Table of contents with progress

Table of contents with progress