{
  "id": "todo-checklist",
  "name": "To-Do Checklist",
  "category": "forms",
  "tags": [
    "todo",
    "task list",
    "checkbox",
    "strikethrough",
    "done",
    "checklist"
  ],
  "description": "A to-do list with round checkboxes where finished tasks get a line drawn through them and fade out.",
  "url": "https://copy-css.com/snippets/todo-checklist",
  "markdown": "https://copy-css.com/snippets/todo-checklist.md",
  "html": "<fieldset class=\"todo-list\">\n  <legend>Today</legend>\n  <label><input type=\"checkbox\" checked><span>Review pull request</span></label>\n  <label><input type=\"checkbox\"><span>Write release notes</span></label>\n  <label><input type=\"checkbox\"><span>Book team lunch</span></label>\n</fieldset>",
  "css": ".todo-list {\n  display: grid;\n  gap: 4px;\n  width: 240px;\n  margin: 0;\n  padding: 14px 16px;\n  border: 0;\n  border-radius: 14px;\n  background: #fff;\n  box-shadow: 0 6px 18px -10px rgba(113, 63, 18, 0.35);\n  color: #422006;\n  font-family: system-ui, sans-serif;\n}\n\n.todo-list legend {\n  float: left;\n  margin-bottom: 4px;\n  font-size: 16px;\n  font-weight: 800;\n}\n\n.todo-list label {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  padding: 6px 0;\n  font-size: 14px;\n  cursor: pointer;\n}\n\n.todo-list input {\n  display: grid;\n  flex: none;\n  place-items: center;\n  width: 20px;\n  height: 20px;\n  margin: 0;\n  border: 2px solid #facc15;\n  border-radius: 50%;\n  -webkit-appearance: none;\n  appearance: none;\n  cursor: pointer;\n}\n\n.todo-list input::before {\n  content: \"✓\";\n  color: #fff;\n  font-size: 12px;\n  font-weight: 900;\n  transform: scale(0);\n  transition: transform 0.15s ease;\n}\n\n.todo-list input:checked {\n  border-color: #ca8a04;\n  background: #ca8a04;\n}\n\n.todo-list input:checked::before {\n  transform: scale(1);\n}\n\n.todo-list input:focus-visible {\n  outline: 2px solid #ca8a04;\n  outline-offset: 2px;\n}\n\n.todo-list span {\n  background: linear-gradient(#a16207, #a16207) no-repeat 0 55% / 0 1.5px;\n  transition: background-size 0.3s ease, color 0.3s ease;\n}\n\n.todo-list input:checked + span {\n  background-size: 100% 1.5px;\n  color: #a8a29e;\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .todo-list span,\n  .todo-list input::before {\n    transition: none;\n  }\n}",
  "features": [
    "transitions",
    "transforms",
    "linear gradients",
    "box shadows",
    "CSS Grid",
    "Flexbox",
    "the :checked state (no JavaScript)",
    "keyboard focus styles",
    "reduced-motion support"
  ],
  "customProperties": []
}
