Task list focus — Tasks block

Free

tasks-task-list-focus · for app, tasks pages

Task list focus

Today and overdue tasks beside a quieter upcoming agenda, using only the host’s deadline classifications.

Documentation

Installation

One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).

pnpm dlx shadcn-vue@latest add @trame/tasks-task-list-focus

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import TasksTaskListFocus from '@/components/trame/blocks/tasks/tasks-task-list-focus.vue'

const props = {
title: "Work to follow up",
intro: "Clear tasks, from the first draft to the final check.",
tasks: [
{
id: "task-0",
title: "Review the packing guide",
status: "todo",
assignee: {
name: "Shop manager"
},
due: "October 11",
period: "today",
priority: "high",
project: "Shop life",
description: "Go over the steps with the person who packs the parcels."
},
{
id: "task-1",
title: "Check the delivery addresses",
status: "doing",
assignee: {
name: "Logistics team"
},
due: "October 10",
period: "overdue",
priority: "high",
project: "Shipping"
}
],
complete: "tasks.complete",
open: "tasks.open",
options: {
footnote: "Due dates and responsibilities are set by your team."
}
}
</script>

<template>
<TasksTaskListFocus v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordsthe section’s heading
introstringWordsa sentence or two under the heading
tasks*unknown[]Datathe tasks
completestringActiona task’s box: the host receives `{ id, enabled }` (a done task is `enabled: true`), saves it and sends the tasks back
openstringActiona named action of the page
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Options options · 2 props
PropTypeDescription
footnotestringWordsa small line at the foot of the section
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa band of the page that redefines the theme surfaces inside it
What it asks your app for

The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour word for an interface key, or undefined to keep the block’s own

The words it says itself, in English and French; label(key) replaces any of them:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo many attempts, try again in a moment.Trop de tentatives, réessayez dans un moment.

Features

  • Every word in the server HTML
  • Same markup in Vue and React
  • Theme tokens only: every theme, light and dark
  • Shows what you give it, invents nothing
  • No motion; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: record.toggle, open
  • Reads tasks from your app

A tasks section, for app, tasks pages; it uses @lucide/vue.

More tasks blocks

  • Approval queue cards: a few requests (up to six) that each need a yes or a no, with the context to decide.
  • Approval queue conflict: two versions of the same item side by side, to keep one, the other or both.
  • Approval queue review: A split case file with supporting content beside a decision form, using the merchant’s own evidence only.
  • Approval queue table: a long queue to go through quickly: dense rows, select several, approve or decline in bulk.
  • Approval queue triage: Requests grouped by kind in a numbered register for a moderation pass, using the merchant’s own reports only.
  • Ticket queue table detail: A ticket register above the open case for reviewing the merchant’s own support queue without losing the order context.

All 10 tasks blocks