やることリスト
折りたたみ可能なタスク一覧です。残りの件数と全件数を表示し、未完了のタスクを優先度順に先頭に並べます。
テーブル、データグリッド、統計、ツリー、ヒートマップ、ページネーション。
lr-todo-list
import '@aceshooting/lyra-ui/components/lr-todo-list.js';例
<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>関連コンポーネント
- バーリスト — ラベル付きの値を、ロケールに応じた書式の数値と実際のテキストラベルを備えた横向きのDOMバーで順位付けする。
- ラジアルバー — カテゴリごとに1つずつ、同心円状のSVG進捗リングを描画する。アクセシブルなリストを兼ねる凡例も任意で表示できる。
- カテゴリバー — 1本の横棒をしきい値の範囲に分割し、目盛り上の値を指すマーカーを任意で表示する。
- 統計 — 単位、トレンドピル、内訳行、任意のスパークラインを備えた単一のKPIを表示する。
- テーブル — ソート可能なヘッダー、選択、フィルタリング、ページネーションを備えた表示用データテーブル。
- タイムライン — 数値軸上の比率に応じた位置にラベル付きセグメントを表示します。間隔、端のマーク、データテーブルも表示します。