# Weekly pill blister checkboxes

> A seven-day blister pack: checking a day crushes the bubble, pushes the pill out and leaves torn foil behind.

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

## Where to use it

This group of seven checkboxes is drawn as a pill blister with a silver foil card and clear domes, one per weekday. Checking a day squashes its dome, pushes the two-tone capsule out and leaves a torn hole in the foil, and the day label changes color. Each dome is a real checkbox with the full day name for screen readers. It fits medication reminders, health apps and routine trackers.

The main color is one half of the capsule and the day highlight, the secondary color the other half. Change the legend for vitamins or supplements, and use it in a weekly view where people can see at a glance what is left.

## Code

### HTML

```html
<fieldset class="uvq02-bls"><legend>Pills for the week</legend><div class="cd"><label><input type="checkbox" aria-label="Monday"><span class="cv" aria-hidden="true"><i></i></span><span class="dy" aria-hidden="true">MON</span></label><label><input type="checkbox" aria-label="Tuesday"><span class="cv" aria-hidden="true"><i></i></span><span class="dy" aria-hidden="true">TUE</span></label><label><input type="checkbox" aria-label="Wednesday"><span class="cv" aria-hidden="true"><i></i></span><span class="dy" aria-hidden="true">WED</span></label><label><input type="checkbox" aria-label="Thursday"><span class="cv" aria-hidden="true"><i></i></span><span class="dy" aria-hidden="true">THU</span></label><label><input type="checkbox" aria-label="Friday"><span class="cv" aria-hidden="true"><i></i></span><span class="dy" aria-hidden="true">FRI</span></label><label><input type="checkbox" aria-label="Saturday"><span class="cv" aria-hidden="true"><i></i></span><span class="dy" aria-hidden="true">SAT</span></label><label><input type="checkbox" aria-label="Sunday"><span class="cv" aria-hidden="true"><i></i></span><span class="dy" aria-hidden="true">SUN</span></label></div></fieldset>
```

### CSS

```css
.uvq02-bls {
  --c1: #ef5d60;
  --c2: #f7f3ea;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq02-bls {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: .9em 1em 1em;
  border: 0;
  min-inline-size: 0;
  border-radius: .9em;
  background: linear-gradient(135deg,#f4f6f8,#cfd5db 45%,#eef1f4 55%,#bac1c9);
  box-shadow: inset 0 1px 0 #fff,inset 0 0 0 1px rgba(0,0,0,.06),0 .8em 1.6em -1em rgba(0,0,0,.5);
  color: #3a4250;
}

.uvq02-bls legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 .75em;
  font-size: .85em;
  font-weight: 750;
}

.uvq02-bls .cd {
  clear: both;
  display: grid;
  grid-template-columns: repeat(7,2.1em);
  gap: .4em;
}

.uvq02-bls label {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .4em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.uvq02-bls input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq02-bls .cv {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%,rgba(255,255,255,.95),rgba(255,255,255,.35) 28%,rgba(255,255,255,.06) 62%),rgba(205,216,228,.4);
  box-shadow: inset 0 -.15em .25em rgba(0,0,0,.12),0 .16em .28em rgba(0,0,0,.2),0 0 0 1px rgba(255,255,255,.75);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1),box-shadow calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq02-bls .cv::after {
  content: "";
  position: absolute;
  inset: .3em;
  background: radial-gradient(circle,#4b5361 30%,#727b88 70%);
  clip-path: polygon(92.0% 50.0%,78.1% 61.7%,81.2% 81.2%,60.1% 74.4%,50.0% 98.0%,38.5% 77.8%,17.7% 82.3%,21.7% 61.7%,4.7% 50.0%,23.4% 39.0%,19.2% 19.2%,37.3% 19.4%,50.0% 7.0%,61.4% 22.5%,82.6% 17.4%,81.7% 36.9%);
  opacity: 0;
  transform: scale(.3) rotate(-20deg);
  transition: opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq02-bls .cv i {
  position: relative;
  z-index: 1;
  width: 1.45em;
  height: .66em;
  border-radius: 1em;
  background: linear-gradient(90deg,var(--c1) 50%,var(--c2) 50%);
  box-shadow: inset 0 -.12em .15em rgba(0,0,0,.2),inset 0 .1em .1em rgba(255,255,255,.55),0 .08em .12em rgba(0,0,0,.2);
  transform: rotate(-32deg);
  transition: transform calc(0.4s / var(--k)) cubic-bezier(.5,-.5,.8,.5),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1) calc(0.1s / var(--k));
}

.uvq02-bls .dy {
  font-family: ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  font-size: .56em;
  font-weight: 700;
  letter-spacing: .06em;
  color: #5f6876;
}

.uvq02-bls label:hover .cv {
  transform: translateY(-.08em);
}

.uvq02-bls label:active .cv {
  transform: scale(.88);
}

.uvq02-bls input:checked + .cv {
  transform: scale(.9);
  background: radial-gradient(circle at 50% 45%,rgba(255,255,255,.4),rgba(255,255,255,.05) 70%),rgba(190,200,212,.4);
  box-shadow: inset 0 .12em .25em rgba(0,0,0,.28),0 0 0 1px rgba(255,255,255,.6);
}

.uvq02-bls input:checked + .cv::after {
  opacity: 1;
  transform: none;
}

.uvq02-bls input:checked + .cv i {
  transform: rotate(-32deg) translate(.4em,1.4em) scale(.5);
  opacity: 0;
}

.uvq02-bls input:checked ~ .dy {
  color: var(--c1);
}

.uvq02-bls input:focus-visible + .cv {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@media (prefers-reduced-motion:reduce) {
  .uvq02-bls,.uvq02-bls *,.uvq02-bls *::before,.uvq02-bls *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
```

### React

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

const css = `
.uvq02-bls {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: .9em 1em 1em;
  border: 0;
  min-inline-size: 0;
  border-radius: .9em;
  background: linear-gradient(135deg,#f4f6f8,#cfd5db 45%,#eef1f4 55%,#bac1c9);
  box-shadow: inset 0 1px 0 #fff,inset 0 0 0 1px rgba(0,0,0,.06),0 .8em 1.6em -1em rgba(0,0,0,.5);
  color: #3a4250;
}

.uvq02-bls legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 .75em;
  font-size: .85em;
  font-weight: 750;
}

.uvq02-bls .cd {
  clear: both;
  display: grid;
  grid-template-columns: repeat(7,2.1em);
  gap: .4em;
}

.uvq02-bls label {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .4em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.uvq02-bls input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq02-bls .cv {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%,rgba(255,255,255,.95),rgba(255,255,255,.35) 28%,rgba(255,255,255,.06) 62%),rgba(205,216,228,.4);
  box-shadow: inset 0 -.15em .25em rgba(0,0,0,.12),0 .16em .28em rgba(0,0,0,.2),0 0 0 1px rgba(255,255,255,.75);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1),box-shadow calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq02-bls .cv::after {
  content: "";
  position: absolute;
  inset: .3em;
  background: radial-gradient(circle,#4b5361 30%,#727b88 70%);
  clip-path: polygon(92.0% 50.0%,78.1% 61.7%,81.2% 81.2%,60.1% 74.4%,50.0% 98.0%,38.5% 77.8%,17.7% 82.3%,21.7% 61.7%,4.7% 50.0%,23.4% 39.0%,19.2% 19.2%,37.3% 19.4%,50.0% 7.0%,61.4% 22.5%,82.6% 17.4%,81.7% 36.9%);
  opacity: 0;
  transform: scale(.3) rotate(-20deg);
  transition: opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq02-bls .cv i {
  position: relative;
  z-index: 1;
  width: 1.45em;
  height: .66em;
  border-radius: 1em;
  background: linear-gradient(90deg,var(--c1) 50%,var(--c2) 50%);
  box-shadow: inset 0 -.12em .15em rgba(0,0,0,.2),inset 0 .1em .1em rgba(255,255,255,.55),0 .08em .12em rgba(0,0,0,.2);
  transform: rotate(-32deg);
  transition: transform calc(0.4s / var(--k)) cubic-bezier(.5,-.5,.8,.5),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1) calc(0.1s / var(--k));
}

.uvq02-bls .dy {
  font-family: ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  font-size: .56em;
  font-weight: 700;
  letter-spacing: .06em;
  color: #5f6876;
}

.uvq02-bls label:hover .cv {
  transform: translateY(-.08em);
}

.uvq02-bls label:active .cv {
  transform: scale(.88);
}

.uvq02-bls input:checked + .cv {
  transform: scale(.9);
  background: radial-gradient(circle at 50% 45%,rgba(255,255,255,.4),rgba(255,255,255,.05) 70%),rgba(190,200,212,.4);
  box-shadow: inset 0 .12em .25em rgba(0,0,0,.28),0 0 0 1px rgba(255,255,255,.6);
}

.uvq02-bls input:checked + .cv::after {
  opacity: 1;
  transform: none;
}

.uvq02-bls input:checked + .cv i {
  transform: rotate(-32deg) translate(.4em,1.4em) scale(.5);
  opacity: 0;
}

.uvq02-bls input:checked ~ .dy {
  color: var(--c1);
}

.uvq02-bls input:focus-visible + .cv {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@media (prefers-reduced-motion:reduce) {
  .uvq02-bls,.uvq02-bls *,.uvq02-bls *::before,.uvq02-bls *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

export default function ChkBlister() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#ef5d60",
          "--c2": "#f7f3ea",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <fieldset className="uvq02-bls"><legend>Pills for the week</legend><div className="cd"><label><input type="checkbox" aria-label="Monday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">MON</span></label><label><input type="checkbox" aria-label="Tuesday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">TUE</span></label><label><input type="checkbox" aria-label="Wednesday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">WED</span></label><label><input type="checkbox" aria-label="Thursday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">THU</span></label><label><input type="checkbox" aria-label="Friday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">FRI</span></label><label><input type="checkbox" aria-label="Saturday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">SAT</span></label><label><input type="checkbox" aria-label="Sunday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">SUN</span></label></div></fieldset>
      </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 “Weekly pill blister checkboxes” block (Checkboxes) from AIMRAN Library to my project.

## What it is
A seven-day blister pack: checking a day crushes the bubble, pushes the pill out and leaves torn foil behind.

## Chosen settings
- Main color: #ef5d60
- Secondary color: #f7f3ea
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Pastillas de la semana"

## 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 = `
.uvq02-bls {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: .9em 1em 1em;
  border: 0;
  min-inline-size: 0;
  border-radius: .9em;
  background: linear-gradient(135deg,#f4f6f8,#cfd5db 45%,#eef1f4 55%,#bac1c9);
  box-shadow: inset 0 1px 0 #fff,inset 0 0 0 1px rgba(0,0,0,.06),0 .8em 1.6em -1em rgba(0,0,0,.5);
  color: #3a4250;
}

.uvq02-bls legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 .75em;
  font-size: .85em;
  font-weight: 750;
}

.uvq02-bls .cd {
  clear: both;
  display: grid;
  grid-template-columns: repeat(7,2.1em);
  gap: .4em;
}

.uvq02-bls label {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .4em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.uvq02-bls input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq02-bls .cv {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%,rgba(255,255,255,.95),rgba(255,255,255,.35) 28%,rgba(255,255,255,.06) 62%),rgba(205,216,228,.4);
  box-shadow: inset 0 -.15em .25em rgba(0,0,0,.12),0 .16em .28em rgba(0,0,0,.2),0 0 0 1px rgba(255,255,255,.75);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1),box-shadow calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq02-bls .cv::after {
  content: "";
  position: absolute;
  inset: .3em;
  background: radial-gradient(circle,#4b5361 30%,#727b88 70%);
  clip-path: polygon(92.0% 50.0%,78.1% 61.7%,81.2% 81.2%,60.1% 74.4%,50.0% 98.0%,38.5% 77.8%,17.7% 82.3%,21.7% 61.7%,4.7% 50.0%,23.4% 39.0%,19.2% 19.2%,37.3% 19.4%,50.0% 7.0%,61.4% 22.5%,82.6% 17.4%,81.7% 36.9%);
  opacity: 0;
  transform: scale(.3) rotate(-20deg);
  transition: opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq02-bls .cv i {
  position: relative;
  z-index: 1;
  width: 1.45em;
  height: .66em;
  border-radius: 1em;
  background: linear-gradient(90deg,var(--c1) 50%,var(--c2) 50%);
  box-shadow: inset 0 -.12em .15em rgba(0,0,0,.2),inset 0 .1em .1em rgba(255,255,255,.55),0 .08em .12em rgba(0,0,0,.2);
  transform: rotate(-32deg);
  transition: transform calc(0.4s / var(--k)) cubic-bezier(.5,-.5,.8,.5),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1) calc(0.1s / var(--k));
}

.uvq02-bls .dy {
  font-family: ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  font-size: .56em;
  font-weight: 700;
  letter-spacing: .06em;
  color: #5f6876;
}

.uvq02-bls label:hover .cv {
  transform: translateY(-.08em);
}

.uvq02-bls label:active .cv {
  transform: scale(.88);
}

.uvq02-bls input:checked + .cv {
  transform: scale(.9);
  background: radial-gradient(circle at 50% 45%,rgba(255,255,255,.4),rgba(255,255,255,.05) 70%),rgba(190,200,212,.4);
  box-shadow: inset 0 .12em .25em rgba(0,0,0,.28),0 0 0 1px rgba(255,255,255,.6);
}

.uvq02-bls input:checked + .cv::after {
  opacity: 1;
  transform: none;
}

.uvq02-bls input:checked + .cv i {
  transform: rotate(-32deg) translate(.4em,1.4em) scale(.5);
  opacity: 0;
}

.uvq02-bls input:checked ~ .dy {
  color: var(--c1);
}

.uvq02-bls input:focus-visible + .cv {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@media (prefers-reduced-motion:reduce) {
  .uvq02-bls,.uvq02-bls *,.uvq02-bls *::before,.uvq02-bls *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

export default function ChkBlister() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#ef5d60",
          "--c2": "#f7f3ea",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <fieldset className="uvq02-bls"><legend>Pills for the week</legend><div className="cd"><label><input type="checkbox" aria-label="Monday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">MON</span></label><label><input type="checkbox" aria-label="Tuesday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">TUE</span></label><label><input type="checkbox" aria-label="Wednesday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">WED</span></label><label><input type="checkbox" aria-label="Thursday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">THU</span></label><label><input type="checkbox" aria-label="Friday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">FRI</span></label><label><input type="checkbox" aria-label="Saturday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">SAT</span></label><label><input type="checkbox" aria-label="Sunday" /><span className="cv" aria-hidden="true"><i></i></span><span className="dy" aria-hidden="true">SUN</span></label></div></fieldset>
      </div>
    </>
  );
}
```

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