shadcn.io is not affiliated with official shadcn/ui
Template Task List Block for Svelte
A task list that starts from templates: add Sprint planning, Weekly review or Release checklist under your tasks or replace the open ones (with a confirm), and save your own open tasks as one of two templates, with Undo.
Installation
Overview
Let people start a list from a template instead of an empty page, with this to-do list block for Svelte with Ark UI. A hairline frame with a plus mark on each corner holds three bands. The first lists three built-in templates (Sprint planning, Weekly review, Release checklist) with their task counts, each with an outline button that says Add or Replace, chosen by a Segment Group at the band's end. The second has two shelves for your own templates, a Badge marking them "Yours", and a small form that saves your open tasks under a name. The third is the list, a held-height set of Checkbox rows where template tasks carry a "From Sprint planning" badge. Add puts the tasks under the ones you have; Replace removes the open ones first and asks in an Alert Dialog when there are any, with focus on Keep my tasks. A one-line Undo takes back the last add or replace. Bands are ruled by Guides. For recurring checklists, onboarding and planning rituals.
FAQ
What is the difference between Add and Replace?
Add keeps everything and puts the template's tasks after your own. Replace removes your open tasks and puts the template's in their place, while done tasks stay. With Replace and at least one open task, an alert dialog says how many tasks go and how many come in, and its safe choice, Keep my tasks, has focus. Nothing changes until you confirm.
How do my own templates work?
Name the template and press Save template: the open tasks at that moment (their titles) are stored on a free shelf, shown with a Yours badge, and can be added or used to replace like the built-in ones. There are two shelves; a full pair shows a message under the field and a delete button on each saved template frees one. Names must be unique, and a template can't be saved from an empty set of open tasks.
How does Undo work?
Every add or replace stores the list as it was and shows one line, for example "Replaced 3 open tasks with Sprint planning", with an Undo button that puts that exact list back, including the open tasks a replace removed. The line holds one step, and Undo clears it.
What stays local, and how do I save for real?
Everything: the list and the shelves reset on reload. In your app load the built-in templates from your server, store a saved template from save against the account, and write the list from apply, toggle and undo.
Is it accessible?
Each template button is named with its template ("Add Sprint planning"), each task has a checkbox named by its title, and one polite status message announces every add, replace, save and undo. The confirm is an AlertDialog driven by open and onOpenChange; focus returns to the template button that asked.