micka_design

Checkbox Group

Forms 12

About

A checkbox group with proximity hover, animated checkmarks, contiguous selection merging, and spring transitions. Built on Radix UI with Framer Motion.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Checkbox Group to your project and fits it to your theme.

Code

How Checkbox Group is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { useState } from "react";
import { CheckboxGroup, CheckboxItem } from "../components/ui/checkbox-group";

const items = ["React", "TypeScript", "Tailwind CSS", "Framer Motion"];

export default function CheckboxAllCheckedDemo() {
  const [checked, setChecked] = useState<Set<number>>(new Set([0, 1, 2, 3]));

  const toggle = (index: number) => {
    setChecked((prev) => {
      const next = new Set(prev);
      if (next.has(index)) next.delete(index);
      else next.add(index);
      return next;
    });
  };

  return (
    <div className="flex items-center justify-center min-h-screen bg-background">
      <CheckboxGroup checkedIndices={checked} className="w-80">
        {items.map((item, i) => (
          <CheckboxItem key={item} label={item} index={i} checked={checked.has(i)} onToggle={() => toggle(i)} />
        ))}
      </CheckboxGroup>
    </div>
  );
}

Dependencies

More by micka_design

View all
  • Switch

    Switch

    87
  • Select

    Select

    84
  • Table

    Table

    38
  • Accordion

    Accordion

    38
  • Segmented Tabs

    Segmented Tabs

    37
  • Slider

    Slider

    24
  • Tabs Subtle

    Tabs Subtle

    22
  • Badge

    Badge

    18

More in Forms

View all
  • Login 1

    Login 1

    52
  • Premium Auth

    Premium Auth

    491
  • Contact Card

    Contact Card

    1K
  • Form

    Form

    136
  • Login 2

    Login 2

    7
  • Login Form

    Login Form

    6
  • Authentication Card

    Authentication Card

    45
  • Card Studio

    Card Studio

    41