kitbash Sign in Connect agent
Components

Two plans

A soft grey free plan beside a near-black paid plan, with a monthly and yearly pill switch, check rows and the pill buttons.

Part of the style

Soft Pill Console

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --paper: #ebeceb;
  --stage: #dcdedc;
  --well: #d2d5d2;
  --fill: #b8bcb8;
  --dot: #c6c9c6;
  --chip: #ebeceb;
  --ink: #1d0c0c;
  --ink-2: #3e2d2d;
  --ink-soft: #5b4c4b;
  --ink-mute: #786a69;
  --ink-faint: #939a93;
  --night: #0e0202;
  --night-2: #211010;
  --on-night: #e0e2e0;
  --on-night-soft: #7c847c;
  --line: rgba(29, 12, 12, 0.14);
}
</style>

<section class="pricing">
  <div class="pricing__head">
    <h2 class="pricing__title">Keep every timer</h2>
    <div class="pricing__seg" role="radiogroup" aria-label="Billing">
      <span class="pricing__chip" aria-hidden="true"></span>
      <button class="pricing__option is-on" type="button" role="radio" aria-checked="true" data-period="month">Monthly</button>
      <button class="pricing__option" type="button" role="radio" aria-checked="false" data-period="year">Yearly <span class="pricing__save">−30%</span></button>
    </div>
  </div>

  <div class="pricing__grid">
    <article class="pricing__card">
      <p class="pricing__name">Starter</p>
      <p class="pricing__price"><span class="pricing__amount" data-month="0" data-year="0">€0</span> <span class="pricing__per">forever</span></p>
      <p class="pricing__lede">The step player, three saved recipes and a timer that rings once.</p>
      <ul class="pricing__list">
        <li class="pricing__item">Step player with five steps</li>
        <li class="pricing__item">Three saved recipes</li>
        <li class="pricing__item is-off">Bake journal</li>
      </ul>
      <a class="pricing__button pricing__button--ghost" href="#">Start free</a>
    </article>

    <article class="pricing__card pricing__card--night">
      <p class="pricing__name">Pellow Plus <span class="pricing__badge">Most picked</span></p>
      <p class="pricing__price"><span class="pricing__amount" data-month="6" data-year="4">€6</span> <span class="pricing__per">a month</span></p>
      <p class="pricing__lede">Every recipe, up to eight steps, the full journal and timers on every device.</p>
      <ul class="pricing__list">
        <li class="pricing__item">Up to eight steps a recipe</li>
        <li class="pricing__item">Unlimited saved recipes</li>
        <li class="pricing__item">Bake journal and meters</li>
      </ul>
      <a class="pricing__button" href="#">Get Plus</a>
    </article>
  </div>
</section>

<style>
  .pricing {
    max-width: 960px;
    margin: 0 auto;
    padding: var(--space-xl) var(--edge) var(--section-space);
  }
  .pricing__head {
    display: grid;
    justify-items: center;
    gap: var(--space-l);
    margin-bottom: var(--space-xl);
    text-align: center;
  }
  .pricing__title {
    margin: 0;
    font-size: var(--text-2xl);
    font-weight: 500;
    letter-spacing: var(--tracking-tight);
    line-height: 1.1;
  }
  .pricing__seg {
    position: relative;
    display: inline-flex;
    padding: var(--space-xs);
    border-radius: var(--pill);
    background: var(--well);
  }
  .pricing__chip {
    position: absolute;
    top: var(--space-xs);
    left: 0;
    width: 0;
    height: calc(100% - 2 * var(--space-xs));
    border-radius: var(--pill);
    background: var(--chip);
    box-shadow: var(--shadow-chip);
    transition: transform var(--time) var(--spring), width var(--time) var(--spring);
  }
  .pricing__option {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--control-h);
    padding: 0 var(--space-m);
    border: 0;
    border-radius: var(--pill);
    background: none;
    color: var(--ink-mute);
    font: inherit;
    font-size: var(--text-m);
    cursor: pointer;
    transition: color var(--quick) var(--ease);
  }
  .pricing__option:hover,
  .pricing__option.is-on { color: var(--ink); }
  .pricing__save {
    color: var(--ink-faint);
    font-size: var(--text-xs);
  }

  .pricing__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
  }
  .pricing__card {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    padding: var(--space-l);
    border-radius: var(--radius-stage);
    background: var(--stage);
    color: var(--ink);
  }
  .pricing__card--night {
    background: var(--night);
    color: var(--on-night);
  }
  .pricing__name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s);
    margin: 0;
    font-size: var(--text-base);
    font-weight: 500;
  }
  .pricing__badge {
    padding: 4px 10px;
    border-radius: var(--pill);
    background: var(--night-2);
    color: var(--on-night-soft);
    font-size: var(--text-xs);
    font-weight: 400;
  }
  .pricing__price {
    display: flex;
    align-items: baseline;
    gap: var(--space-s);
    margin: var(--space-s) 0 0;
  }
  .pricing__amount {
    font-size: clamp(40px, 5vw, 56px);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .pricing__per,
  .pricing__lede {
    color: var(--ink-mute);
    font-size: var(--text-m);
  }
  .pricing__lede { margin: 0; line-height: 1.5; }
  .pricing__card--night .pricing__per,
  .pricing__card--night .pricing__lede { color: var(--on-night-soft); }

  .pricing__list {
    display: grid;
    gap: 6px;
    margin: var(--space-s) 0 0;
    padding: 0;
    list-style: none;
  }
  .pricing__item {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    min-height: 40px;
    padding: 0 var(--space-m);
    border-radius: var(--radius-s);
    background: var(--well);
    color: var(--ink-2);
    font-size: var(--text-s);
  }
  .pricing__item::before {
    content: "";
    flex: none;
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: var(--pill);
    background: var(--ink);
  }
  .pricing__item.is-off { color: var(--ink-faint); }
  .pricing__item.is-off::before { background: var(--fill); }
  .pricing__card--night .pricing__item {
    background: var(--night-2);
    color: var(--on-night);
  }
  .pricing__card--night .pricing__item::before { background: var(--on-night); }

  .pricing__button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--control-h);
    margin-top: auto;
    border-radius: var(--pill);
    background: var(--on-night);
    color: var(--ink);
    font-size: var(--text-m);
    font-weight: 500;
    text-decoration: none;
    transition: opacity var(--quick) var(--ease), background var(--quick) var(--ease), scale var(--time) var(--spring-soft);
  }
  .pricing__list + .pricing__button { margin-top: var(--space-l); }
  .pricing__button:hover { opacity: 0.88; }
  .pricing__button:active { scale: 0.97; }
  .pricing__button--ghost {
    border: var(--hairline) solid var(--line);
    background: transparent;
    color: var(--ink-2);
  }
  .pricing__button--ghost:hover { background: var(--well); opacity: 1; }
  .pricing__button:focus-visible,
  .pricing__option:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
  }
  .pricing__card--night .pricing__button:focus-visible { outline-color: var(--on-night); }

  @media (max-width: 40rem) {
    .pricing__grid { grid-template-columns: minmax(0, 1fr); }
  }
</style>

<script>
  (() => {
    document.querySelectorAll(".pricing").forEach((root) => {
      const options = [...root.querySelectorAll(".pricing__option")];
      const chip = root.querySelector(".pricing__chip");
      const place = () => {
        const on = root.querySelector(".pricing__option.is-on");
        if (!on.offsetWidth) return;
        chip.style.width = on.offsetWidth + "px";
        chip.style.transform = `translateX(${on.offsetLeft}px)`;
      };
      options.forEach((option) => {
        option.addEventListener("click", () => {
          options.forEach((other) => {
            other.classList.toggle("is-on", other === option);
            other.setAttribute("aria-checked", String(other === option));
          });
          place();
          const period = option.dataset.period;
          root.querySelectorAll(".pricing__amount").forEach((amount) => {
            amount.textContent = "€" + amount.dataset[period];
          });
        });
      });
      place();
      if ("ResizeObserver" in window) new ResizeObserver(place).observe(root.querySelector(".pricing__seg"));
    });
  })();
</script>

Similar components

Pricing file

Pricing file

Price and date picker

Price and date picker

One plan pricing

One plan pricing

Plans with meters

Plans with meters

Three-step tiers

Three-step tiers

Rates list

Rates list

Formats and sample

Formats and sample

Three plans, middle one white

Three plans, middle one white