Bar List

ラベル付きの横棒をランキング表示し、値を横に添えるリスト。最大値または合計に合わせて伸縮し、ラベルには任意のテンプレートを使えます。

対応フレームワーク
  • Angular: 対応
  • Vue: 対応
  • React: 対応
  • React Native: 対応

使い方

  • Summarized42
  • Exported31
  • Draft6
  • Error2
  • claude-sonnet-4-5 182.4k
  • claude-haiku-4-5 64.2k
  • llama3.1:8b (local Ollama) 21.1k

インポート

ts
import {
  SoneBarListComponent,
  SoneBarListLabelDirective,
} from "@surface-one/angular/bar-list";

API リファレンス

SoneBarListComponentコンポーネント

`<sone-bar-list>` — a ranked list of labelled horizontal bars with the value written next to each (Tremor's BarList). A real `<ul>`: every row reads as “label value”, the bar itself is decoration.

セレクター
sone-bar-list
入力
名前型 デフォルト
items

The rows, drawn in the order given (sort them yourself for a ranking).

readonly T[][]
scale

What a full bar means: the largest value (`max`) or the sum of all values (`total`).

SoneBarListScale"max"
max

A fixed full-bar value instead of the one `scale` computes (e.g. a quota).

number | null | undefinedundefined
valueFormat

Formats `value` when an item has no `valueLabel`; default: a localized number.

SoneBarListFormatdefaultFormat
ariaLabel

Names the list (“Tokens by model”).

string | nullnull

SoneBarListLabelDirectiveディレクティブ

`<ng-template soneBarListLabel let-item>` — renders each row's label instead of its text (a badge, an avatar, a link). `soneBarListLabelOf` only TYPES `let-item` when the items carry extra fields.

セレクター
ng-template[soneBarListLabel]
入力
名前型 デフォルト
soneBarListLabelOfreadonly T[] | null | undefinedundefined