Rating

スコアを表す星。読み取り専用では小数も塗れる画像、操作可能ではキーボードで評価できるラジオグループ。フォームコントロールとして使えます。

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

使い方

4.5 · 128 reviews
Your rating

Not rated yet · choose the same star again to clear.

インポート

ts
import {
  SoneRatingComponent,
} from "@surface-one/angular/rating";

API リファレンス

SoneRatingComponentコンポーネント

Stars for a score. Read-only (`readonly`) it is one image named "4.5 out of 5" and fills fractions; interactive it is a native radio group — arrow keys move the score, every star is a labelled radio — and a ControlValueAccessor of `number` (0 = no rating).

セレクター
sone-rating
入力
名前型 デフォルト
value双方向

The score, 0 to `max`. Fractions show only when read-only.

number0
maxnumber5
sizeRatingSize"default"
readonly

Show the score without letting it change.

booleanfalse
disabledbooleanfalse
clearable

Choosing the current score again clears it to 0.

booleanfalse
ariaLabel

The group's accessible name (interactive) or a prefix of the image's (read-only).

string | nullnull