# Stacked agenda card

> A mini agenda where upcoming events sit slightly stacked and straighten out when you hover the card.

- Category: [Cards](https://library.aimran.es/components/cards)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-card-calendar
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

A compact “what's next” block for the home screen of an app: upcoming classes in a gym app, the week's appointments in a physio's patient portal or the next shifts in a staff rota app. This calendar card starts slightly stacked, lines up on hover, and each row slides a little as you point at it.

Three events work best; with more, the stacked effect fades and it becomes a plain list. Put the day number in the colored square and let the title be the thing people read first. The “+” button is only visual, so connect it to your own form.

## Code

### HTML

```html
<article class="uv-ccal"><header><div><small>AGENDA</small><h3>Next week</h3></div><button>＋</button></header><section><div><b>09</b><span><strong>Product review</strong><small>09:30 · Sala norte</small></span></div><div><b>11</b><span><strong>Creative direction</strong><small>12:00 · Estudio 2</small></span></div><div><b>14</b><span><strong>Launch</strong><small>18:30 · Remoto</small></span></div></section></article>
```

### CSS

```css
.uv-ccal {
  --c1: #0071e3;
  --c2: #8ec5ff;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uv-ccal {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  width: 18em;
  padding: 1.4em;
  border-radius: 1.5em;
  font-size: var(--s);
  color: var(--fg);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent),0 20px 50px -35px #000;
}

.uv-ccal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1em;
}

.uv-ccal header small {
  font-size: .6em;
  color: var(--c1);
}

.uv-ccal h3 {
  margin: .2em 0;
  font-size: 1.2em;
}

.uv-ccal header button {
  width: 2.4em;
  height: 2.4em;
  border: 0;
  border-radius: 50%;
  font-size: 1.1em;
  color: #fff;
  background: var(--c1);
}

.uv-ccal section {
  display: grid;
  gap: .55em;
}

.uv-ccal section>div {
  display: flex;
  align-items: center;
  gap: .8em;
  padding: .8em;
  border-radius: .9em;
  background: color-mix(in srgb,var(--fg) 5%,transparent);
  transition: transform calc(0.38s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-ccal section>div:nth-child(2) {
  transform: scale(.97);
}

.uv-ccal section>div:nth-child(3) {
  transform: scale(.94);
}

.uv-ccal:hover section>div {
  transform: none;
}

.uv-ccal section>div:hover {
  transform: translateX(.3em);
  background: color-mix(in srgb,var(--c1) 10%,transparent);
}

.uv-ccal section b {
  display: grid;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  border-radius: .7em;
  color: var(--c1);
  background: var(--bg);
}

.uv-ccal section span {
  min-width: 0;
}

.uv-ccal section strong,.uv-ccal section small {
  display: block;
}

.uv-ccal section strong {
  font-size: .78em;
}

.uv-ccal section small {
  margin-top: .2em;
  font-size: .62em;
  opacity: .48;
}
```

### React

```tsx
import type { CSSProperties } from "react";

const css = `
.uv-ccal {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  width: 18em;
  padding: 1.4em;
  border-radius: 1.5em;
  font-size: var(--s);
  color: var(--fg);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent),0 20px 50px -35px #000;
}

.uv-ccal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1em;
}

.uv-ccal header small {
  font-size: .6em;
  color: var(--c1);
}

.uv-ccal h3 {
  margin: .2em 0;
  font-size: 1.2em;
}

.uv-ccal header button {
  width: 2.4em;
  height: 2.4em;
  border: 0;
  border-radius: 50%;
  font-size: 1.1em;
  color: #fff;
  background: var(--c1);
}

.uv-ccal section {
  display: grid;
  gap: .55em;
}

.uv-ccal section>div {
  display: flex;
  align-items: center;
  gap: .8em;
  padding: .8em;
  border-radius: .9em;
  background: color-mix(in srgb,var(--fg) 5%,transparent);
  transition: transform calc(0.38s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-ccal section>div:nth-child(2) {
  transform: scale(.97);
}

.uv-ccal section>div:nth-child(3) {
  transform: scale(.94);
}

.uv-ccal:hover section>div {
  transform: none;
}

.uv-ccal section>div:hover {
  transform: translateX(.3em);
  background: color-mix(in srgb,var(--c1) 10%,transparent);
}

.uv-ccal section b {
  display: grid;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  border-radius: .7em;
  color: var(--c1);
  background: var(--bg);
}

.uv-ccal section span {
  min-width: 0;
}

.uv-ccal section strong,.uv-ccal section small {
  display: block;
}

.uv-ccal section strong {
  font-size: .78em;
}

.uv-ccal section small {
  margin-top: .2em;
  font-size: .62em;
  opacity: .48;
}
`;

export default function CardCalendar() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#0071e3",
          "--c2": "#8ec5ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <article className="uv-ccal"><header><div><small>AGENDA</small><h3>Next week</h3></div><button>＋</button></header><section><div><b>09</b><span><strong>Product review</strong><small>09:30 · Sala norte</small></span></div><div><b>11</b><span><strong>Creative direction</strong><small>12:00 · Estudio 2</small></span></div><div><b>14</b><span><strong>Launch</strong><small>18:30 · Remoto</small></span></div></section></article>
      </div>
    </>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “Stacked agenda card” block (Cards) from AIMRAN Library to my project.

## What it is
A mini agenda where upcoming events sit slightly stacked and straighten out when you hover the card.

## Chosen settings
- Main color: #0071e3
- Secondary color: #8ec5ff
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Next week"

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with plain HTML and CSS (the reference wraps it in a React component with its CSS). If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
import type { CSSProperties } from "react";

const css = `
.uv-ccal {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  width: 18em;
  padding: 1.4em;
  border-radius: 1.5em;
  font-size: var(--s);
  color: var(--fg);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent),0 20px 50px -35px #000;
}

.uv-ccal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1em;
}

.uv-ccal header small {
  font-size: .6em;
  color: var(--c1);
}

.uv-ccal h3 {
  margin: .2em 0;
  font-size: 1.2em;
}

.uv-ccal header button {
  width: 2.4em;
  height: 2.4em;
  border: 0;
  border-radius: 50%;
  font-size: 1.1em;
  color: #fff;
  background: var(--c1);
}

.uv-ccal section {
  display: grid;
  gap: .55em;
}

.uv-ccal section>div {
  display: flex;
  align-items: center;
  gap: .8em;
  padding: .8em;
  border-radius: .9em;
  background: color-mix(in srgb,var(--fg) 5%,transparent);
  transition: transform calc(0.38s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-ccal section>div:nth-child(2) {
  transform: scale(.97);
}

.uv-ccal section>div:nth-child(3) {
  transform: scale(.94);
}

.uv-ccal:hover section>div {
  transform: none;
}

.uv-ccal section>div:hover {
  transform: translateX(.3em);
  background: color-mix(in srgb,var(--c1) 10%,transparent);
}

.uv-ccal section b {
  display: grid;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  border-radius: .7em;
  color: var(--c1);
  background: var(--bg);
}

.uv-ccal section span {
  min-width: 0;
}

.uv-ccal section strong,.uv-ccal section small {
  display: block;
}

.uv-ccal section strong {
  font-size: .78em;
}

.uv-ccal section small {
  margin-top: .2em;
  font-size: .62em;
  opacity: .48;
}
`;

export default function CardCalendar() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#0071e3",
          "--c2": "#8ec5ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <article className="uv-ccal"><header><div><small>AGENDA</small><h3>Next week</h3></div><button>＋</button></header><section><div><b>09</b><span><strong>Product review</strong><small>09:30 · Sala norte</small></span></div><div><b>11</b><span><strong>Creative direction</strong><small>12:00 · Estudio 2</small></span></div><div><b>14</b><span><strong>Launch</strong><small>18:30 · Remoto</small></span></div></section></article>
      </div>
    </>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
