kitbash Sign in Connect agent
Components

Drop-in note

A yellow note card with a cyan border, condensed title and an orange button on a hard bottom edge, which drops in at load and folds into a round tab when closed.

Part of the style

Sunburst Sticker Arches

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

Preview

Code
<style>
/* Goes after the pack's base.css */
@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&family=Fraunces:ital,opsz,wght@1,9..144,400..600&display=swap");
:root {
  --ink: #121212;
  --ink-soft: #242322;
  --paper: #7d837b;
  --white: #7f857d;
  --mist: #646a63;
  --orange: #9b7667;
  --tan: #887f7b;
  --cream: #9f7769;
  --yellow: #e7581d;
  --amber: #e9530c;
  --navy: #280c02;
  --blue: #894425;
  --pink: #9f7769;
  --green: #9b7667;
  --cyan: #9f7769;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --font-display: "Fraunces", Georgia, serif;
}
</style>

<section class="note" aria-label="News">
  <div class="note__aside">
    <p class="note__tag">From the oven</p>
    <p class="note__headline">Little news, pinned where you will see it.</p>
  </div>
  <aside class="note__card">
    <button class="note__close" type="button" aria-label="Close the note"><span class="note__x">x</span></button>
    <h2 class="note__title">Bunbell now takes orders by text!</h2>
    <p class="note__text">Send one line to the shop number, like "a pink cake for Nora, she turns six on Saturday". In a few minutes we text back a sketch and a price.</p>
    <a class="note__button" href="#">Try it out</a>
  </aside>
  <button class="note__tab" type="button" aria-label="Open the note">!</button>
</section>

<style>
  .note {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-l);
    min-height: 400px;
    padding: var(--space-l) var(--edge) var(--section-space);
  }
  .note__aside { flex: 1 1 18rem; max-width: 30rem; }
  .note__tag {
    width: max-content;
    margin: 0 0 var(--space-m);
    padding: 8px 26px;
    border-radius: var(--pill);
    background: var(--navy);
    color: var(--cream);
    font: 400 var(--text-s) var(--font-mono);
  }
  .note__headline {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--display);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.012em;
  }
  .note__card {
    position: relative;
    flex: none;
    width: min(100%, 290px);
    align-self: flex-start;
    padding: var(--space-m) var(--space-m) var(--space-m);
    border: var(--border-note) solid var(--cyan);
    border-radius: var(--radius-s);
    background: var(--yellow);
    transform-origin: 80% 0;
    animation: note-drop var(--slow) var(--ease) 200ms both;
    transition: transform var(--pop) var(--ease), opacity var(--quick) ease;
  }
  .note__close {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .note__x {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--white) 50%, transparent);
    font: 500 var(--text-s) / 1 var(--font-mono);
    color: var(--ink);
    transition: background-color var(--quick) ease;
  }
  .note__close:hover .note__x,
  .note__close:focus-visible .note__x { background: var(--white); }
  .note__title {
    margin: var(--space-xs) var(--space-l) var(--space-s) 0;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
  }
  .note__text {
    margin: 0 0 var(--space-m);
    font-size: var(--text-s);
    line-height: 1.4;
  }
  .note__button {
    display: grid;
    place-items: center;
    min-height: 48px;
    border-radius: var(--radius-field);
    background: var(--orange);
    box-shadow: var(--drop);
    color: var(--cream);
    font: 700 var(--text-s) var(--font-body);
    text-decoration: none;
    transition: transform var(--quick) ease, box-shadow var(--quick) ease;
  }
  .note__button:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink-soft); }
  .note__button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-soft); }
  .note__button:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
  .note__tab {
    position: absolute;
    top: var(--space-l);
    right: var(--edge);
    width: 56px;
    height: 56px;
    border: var(--border-note) solid var(--cyan);
    border-radius: 50%;
    background: var(--yellow);
    font: 700 24px var(--font-display);
    color: var(--ink);
    cursor: pointer;
    scale: 0;
    transition: scale var(--pop) var(--ease);
  }
  .note.is-closed .note__card {
    transform: scale(0.2);
    opacity: 0;
    pointer-events: none;
  }
  .note.is-closed .note__tab { scale: 1; }
  .note__tab:hover { rotate: 12deg; }

  @keyframes note-drop {
    0% { transform: translateY(-120px) rotate(-6deg); opacity: 0; }
    70% { transform: translateY(8px) rotate(1deg); opacity: 1; }
    100% { transform: none; opacity: 1; }
  }
  @media (max-width: 40rem) {
    .note__headline { font-size: 44px; }
  }
</style>

<script>
(() => {
  for (const root of document.querySelectorAll('.note')) {
    const card = root.querySelector('.note__card');
    root.querySelector('.note__close').addEventListener('click', () => {
      card.style.animation = 'none';
      root.classList.add('is-closed');
    });
    root.querySelector('.note__tab').addEventListener('click', () => root.classList.remove('is-closed'));
  }
})();
</script>

Similar components

Big call and footer

Big call and footer

Closing ask and footer

Closing ask and footer

Collection banner

Collection banner

Sign-off and sticker pile

Sign-off and sticker pile

Sticker follow line

Sticker follow line

Green pill sign-off

Green pill sign-off

Studio note

Studio note

Scattered figures banner

Scattered figures banner