To-do list

Collapsible task list that shows remaining and total counts and puts unfinished tasks first by priority.

Tables, data grids, stats, trees, heatmaps, and pagination.

lr-todo-list

import '@aceshooting/lyra-ui/components/lr-todo-list.js';

Example

<lr-todo-list open></lr-todo-list>

<script type="module">
  import '@aceshooting/lyra-ui/components/lr-todo-list.js';

  const list = document.querySelector('lr-todo-list');
  list.items = [
    { text: 'Review the draft', severity: 'urgent', icon: 'check', count: 3, action: 'review-draft' },
    { text: 'Read the component guide', severity: 'info', href: '/docs/?path=/docs/data-display-todo-list--docs' },
    { text: 'Gather feedback', done: true },
  ];
  list.addEventListener('lr-action', ({ detail }) => {
    list.items = list.items.map(item => item.action === detail.action
      ? { ...item, text: 'Draft reviewed', done: true, action: undefined }
      : item);
  });
</script>

Read guide (English)

Related components

  • Bar list — Ranks labelled values as horizontal DOM bars with locale-formatted numbers and real text labels.
  • Radial bar — Draws concentric SVG progress rings, one per category, with an optional legend that doubles as the accessible list.
  • Category bar — Splits one horizontal bar into threshold ranges with an optional marker pointing at a value on the scale.
  • Stat — Presents a single KPI with unit, trend pill, breakdown rows, and an optional sparkline.
  • Table — Presentational data table with sortable headers, selection, filtering, and pagination.
  • Time strip — Displays labelled segments at proportional positions on a numeric axis, with gaps, edge marks, and a data table.