screens/DSTaskCard

DSTaskCard

screens
since v2.0

Task 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

PropTypeDefaultDescription
taskreqDSTaskTask model (title, priority, dueDate, assignees, tags, isComplete).
onTogglereq((Bool) -> Void)Called when the checkbox is tapped.
onTap(() -> Void)?nilOpens 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))
    }
}

Related Components