screens/DSTaskCard
DSTaskCard
screensTask item card with a completion checkbox, priority badge, due date, assignee avatars, and a label/tag row.
iOS 17+macOS 14+
Purpose
To-do lists, project task views, and kanban cards.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| taskreq | DSTask | — | Task model (title, priority, dueDate, assignees, tags, isComplete). |
| onTogglereq | ((Bool) -> Void) | — | Called when the checkbox is tapped. |
| onTap | (() -> Void)? | nil | Opens task detail. |
Examples
Task list
To-do list with live completion toggle.
swift
ForEach(tasks) { task in
DSTaskCard(task: task) { isComplete in
viewModel.toggleTask(task, isComplete: isComplete)
} onTap: {
navigate(.taskDetail(task))
}
}