kitbash Sign in Connect agent
Components

Screen modes

A dark section with a large tablet showing a typeset book page and a segmented switch that turns the screen between day paper, amber backlight and night.

Part of the style

Dappled Shade Paper

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --night: #241f1b;
  --night-soft: #261f19;
  --paper: #c5aa7f;
  --paper-deep: #b59d75;
  --screen: #af9771;
  --bezel: #ab946f;
  --ink: #241f1b;
  --ink-soft: rgba(36, 31, 27, 0.5);
  --ink-faint: rgba(36, 31, 27, 0.16);
  --white: #cbb084;
  --white-soft: rgba(203, 176, 132, 0.7);
  --white-line: rgba(203, 176, 132, 0.14);
  --glass: rgba(196, 169, 127, 0.82);
  --glass-dark: rgba(48, 40, 35, 0.72);
  --shade: rgba(59, 50, 42, 0.16);
  --night-veil: rgba(36, 31, 27, 0.45);
  --shade-deep: rgba(45, 38, 33, 0.38);
  --amber: #b08b6b;
  --amber-deep: #a88568;
  --sticker: #c9ab93;
  --leaf: #9f8b7a;
  --moss: #381d03;
  --moss-light: #593b20;
}
</style>

<section class="screen" data-mode="day">
  <div class="screen__text">
    <p class="screen__eyebrow">Paper screen</p>
    <h2 class="screen__title">The first full-speed <em>paper-like</em> display</h2>
    <p class="screen__lead">Turn pages, scroll and sketch at sixty frames a second, on a surface that reflects the room instead of shining into your eyes.</p>

    <div class="screen__switch" role="radiogroup" aria-label="Screen light">
      <button class="screen__mode is-active" type="button" role="radio" aria-checked="true" data-mode="day">Daylight</button>
      <button class="screen__mode" type="button" role="radio" aria-checked="false" data-mode="amber">Amber lamp</button>
      <button class="screen__mode" type="button" role="radio" aria-checked="false" data-mode="night">Night</button>
    </div>

    <ul class="screen__features">
      <li class="screen__feature">
        <svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="3" width="14" height="18" rx="2"/><path d="M9 8 H15 M9 12 H15 M9 16 H13"/></svg>
        <span class="screen__feature-name">Smooth motion</span>
        <span class="screen__feature-note">No ghosting, no flashing between pages.</span>
      </li>
      <li class="screen__feature">
        <svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2 V5 M12 19 V22 M2 12 H5 M19 12 H22 M5 5 L7 7 M17 17 L19 19 M19 5 L17 7 M7 17 L5 19"/></svg>
        <span class="screen__feature-name">Sunlight-clear</span>
        <span class="screen__feature-note">The brighter the day, the sharper it reads.</span>
      </li>
      <li class="screen__feature">
        <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20 14 A8 8 0 1 1 10 4 A6 6 0 0 0 20 14 Z"/></svg>
        <span class="screen__feature-name">Kind at night</span>
        <span class="screen__feature-note">A warm lamp with no blue light at all.</span>
      </li>
    </ul>
  </div>

  <figure class="screen__device">
    <div class="screen__bezel">
      <div class="screen__page">
        <p class="screen__page-head">Chapter four</p>
        <p class="screen__page-title">The Orchard in October</p>
        <p class="screen__page-body">The light came in low over the wall and lay across the grass in long bars, and between them the windfalls looked darker than they were. Nobody hurried. A ladder leaned on the oldest tree, and someone had left a cup on the third rung.</p>
        <p class="screen__page-body">By four the shadows of the leaves had climbed the side of the shed, moving a little whenever the wind remembered itself.</p>
        <p class="screen__page-foot">48</p>
      </div>
    </div>
  </figure>
</section>

<style>
  .screen {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-xl);
    padding: var(--section-space) var(--edge);
    background: var(--night);
    color: var(--white);
  }
  .screen__eyebrow {
    margin: 0 0 var(--space-m);
    color: var(--white-soft);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: var(--track-caps);
    text-transform: uppercase;
  }
  .screen__title {
    max-width: 12em;
    margin: 0 0 var(--space-m);
    font-size: var(--display);
    font-weight: 300;
    line-height: 1;
    letter-spacing: var(--track-display);
  }
  .screen__title em { font-family: var(--font-serif); font-weight: 300; letter-spacing: -0.05em; }
  .screen__lead { max-width: 30em; margin: 0 0 var(--space-l); color: var(--white-soft); font-size: var(--text-m); line-height: 1.4; }

  .screen__switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius-l);
    background: var(--glass-dark);
    box-shadow: inset 0 0 0 var(--line) var(--white-line);
  }
  .screen__mode {
    min-height: 44px;
    padding: 0 var(--space-m);
    border: 0;
    border-radius: var(--radius-s);
    background: transparent;
    color: var(--white-soft);
    font: 400 var(--text-s) var(--font-sans);
    letter-spacing: var(--track);
    cursor: pointer;
    transition: color var(--quick) var(--ease-out), background-color var(--quick) var(--ease-out);
  }
  .screen__mode:hover { color: var(--white); }
  .screen__mode.is-active { background: var(--paper); color: var(--ink); }
  .screen__mode:focus-visible { outline: var(--line-accent) solid var(--amber); outline-offset: 2px; }

  .screen__features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-m);
    margin: var(--space-xl) 0 0;
    padding: var(--space-m) 0 0;
    border-top: var(--line) solid var(--white-line);
    list-style: none;
  }
  .screen__feature { display: grid; align-content: start; gap: var(--space-xs); }
  .screen__feature svg { width: 22px; margin-bottom: var(--space-xs); fill: none; stroke: var(--white); stroke-width: 1.4; stroke-linecap: round; }
  .screen__feature-name { font-size: var(--text-s); font-weight: 500; }
  .screen__feature-note { color: var(--white-soft); font-size: var(--text-xs); line-height: 1.35; letter-spacing: -0.02em; }

  .screen__device { margin: 0; justify-self: center; width: min(100%, 440px); }
  .screen__bezel {
    aspect-ratio: 3 / 4;
    padding: 8%;
    border-radius: var(--radius-device);
    background: linear-gradient(150deg, var(--paper), var(--bezel) 60%, var(--paper-deep));
    box-shadow: var(--shadow-device);
    transform: rotate(4deg);
    transition: background var(--slow) var(--ease);
  }
  .screen__page {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 9% 10%;
    overflow: hidden;
    border-radius: 4px;
    background: var(--screen);
    color: var(--ink);
    transition: background-color var(--slow) var(--ease), color var(--slow) var(--ease);
  }
  .screen__page-head { margin: 0 0 4px; color: var(--ink-soft); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.04em; transition: color var(--slow) var(--ease); }
  .screen__page-title { margin: 0 0 var(--space-m); font-family: var(--font-serif); font-size: clamp(20px, 2.2vw, 28px); font-weight: 400; line-height: 1.05; letter-spacing: -0.03em; }
  .screen__page-body { margin: 0 0 var(--space-s); font-family: var(--font-serif); font-size: clamp(12px, 1.15vw, 15px); line-height: 1.5; letter-spacing: 0; text-indent: 1.2em; }
  .screen__page-foot { margin: auto 0 0; font-family: var(--font-serif); font-size: var(--text-xs); text-align: center; letter-spacing: 0; }

  .screen[data-mode="amber"] .screen__page { background: var(--amber); color: var(--night); }
  .screen[data-mode="amber"] .screen__bezel { background: linear-gradient(150deg, var(--moss-light), var(--moss)); }
  .screen[data-mode="night"] .screen__page { background: var(--night-soft); color: var(--sticker); }
  .screen[data-mode="night"] .screen__page-head { color: var(--white-soft); }
  .screen[data-mode="night"] .screen__bezel { background: linear-gradient(150deg, var(--moss), var(--night-soft)); }

  @media (max-width: 48rem) {
    .screen { grid-template-columns: 1fr; }
    .screen__device { width: min(86%, 380px); }
    .screen__features { grid-template-columns: 1fr; }
  }
</style>

<script>
  (() => {
    for (const root of document.querySelectorAll('.screen')) {
      const modes = root.querySelectorAll('.screen__mode');
      for (const button of modes) {
        button.addEventListener('click', () => {
          root.dataset.mode = button.dataset.mode;
          for (const other of modes) {
            const on = other === button;
            other.classList.toggle('is-active', on);
            other.setAttribute('aria-checked', String(on));
          }
        });
      }
    }
  })();
</script>

Similar components

App screen showcase

App screen showcase

Collections

Collections

Keypad and knob

Keypad and knob

Dot-grid crafts

Dot-grid crafts

Exposure dial

Exposure dial

Two-part bar

Two-part bar

Familiar to strange slider

Familiar to strange slider

Keycap control bar

Keycap control bar