---
title: "レーティング"
description: "星などいくつかの印で点数を付けてもらう、または付いた点数を示します。点数は印 1 つ単位で、プロダクトが許せば半分単位で扱います。"
url: "https://tanrei.chnotchy.com/ja/components/rating/"
last_updated: 2026-11-20T22:20:49.000Z
---

> このページは Tanrei のドキュメントの一部です。すべてのページは索引 [llms.txt](https://tanrei.chnotchy.com/llms.txt)（英語）に並んでいて、既定のシステムのコンポーネントの仕様は 1 つのファイル [llms-full.txt](https://tanrei.chnotchy.com/llms-full.txt) にまとまっています。

# レーティング

> 星などいくつかの印で点数を付けてもらう、または付いた点数を示します。点数は印 1 つ単位で、プロダクトが許せば半分単位で扱います。

## 概要

### 使い方

Web と React の例は現在の仕様に沿っています。SwiftUI、Compose、Flutter、React Native は予定で、まだレーティングを提供していません。

**Web**

```html
<tanrei-rating name="score" label="このレシピの評価"></tanrei-rating>

<!-- 各点数の言葉は、プロダクトの言語で。ポインターを置いている間、レーティングの横に出します。 -->
<tanrei-rating
  label="あなたの評価"
  option-labels='["悪い", "まあまあ", "良い", "とても良い", "最高"]'
></tanrei-rating>
<span id="words"></span>

<!-- 読むだけの平均点。 -->
<tanrei-rating label="平均評価" value="4.5" read-only value-text="5 つ星中 4.5"></tanrei-rating>

<script type="module">
  import '@tanrei/web/components/rating';
  const rating = document.querySelector('tanrei-rating[option-labels]');
  rating.addEventListener('change', (event) => save(event.detail.value));
  rating.addEventListener('preview', (event) => {
    const score = event.detail.value ?? rating.value;
    document.querySelector('#words').textContent = score ? rating.optionLabels[score - 1] : '';
  });
</script>
```

**React**

```tsx
import { Rating } from '@tanrei/react';

<Rating label="このレシピの評価" value={score} onChange={(event) => setScore(event.detail.value)} />
<Rating
  label="あなたの評価"
  optionLabels={['悪い', 'まあまあ', '良い', 'とても良い', '最高']}
  onPreview={(event) => setPointed(event.detail.value)}
/>
<Rating label="平均評価" value={average} readOnly valueText={`5 つ星中 ${average}`} />
```

## 仕様

- Category: Selection
- Level: base
- Listing: default
- Page: https://tanrei.chnotchy.com/components/rating/
- Spec: https://github.com/chnotchy/tanrei/blob/main/specs/rating.spec.json

### Availability

| Design system | Has it | Notes |
| --- | --- | --- |
| Tanrei (`tanrei`) | Yes | — |
| Cupertino (Apple HIG-inspired) (`cupertino`) | Yes | — |
| M3-like (Material 3-inspired) (`m3-like`) | Yes | — |

### Platforms

- Web: the element `<tanrei-rating>`, registered by importing `@tanrei/web` (or only its own module, `@tanrei/web/components/rating`).
- React: `Rating` from `@tanrei/react`.

| Platform | Name | Status |
| --- | --- | --- |
| Web | `tanrei-rating` | alpha |
| SwiftUI | `TanreiRating` | planned |
| Jetpack Compose | `TanreiRating` | planned |
| Flutter | `TanreiRating` | planned |
| React Native | `Rating` | planned |

Names a platform gives in its own idiom:

| Spec | Web | SwiftUI | Jetpack Compose | Flutter | React Native |
| --- | --- | --- | --- | --- | --- |
| `max` (prop) | `max` | `maximum` | `max` | `max` | `max` |
| `allowHalf` (prop) | `allowHalf` | `allowsHalf` | `allowHalf` | `allowHalf` | `allowHalf` |
| `icon` (prop) | `icon` | `systemImage` | `icon` | `icon` | `icon` |
| `readOnly` (prop) | `readOnly` | `isReadOnly` | `readOnly` | `readOnly` | `readOnly` |
| `disabled` (prop) | `disabled` | `.disabled(_:)` | `enabled` | `enabled` | `disabled` |
| `change` (event) | `change` | `value (Binding)` | `onValueChange` | `onChanged` | `onValueChange` |
| `preview` (event) | `preview` | `onPreview` | `onPreview` | `onPreview` | `onPreview` |

Statuses: `planned` — In the inventory. Nothing shippable exists yet. `lagging` — An implementation of an earlier spec exists; it has not caught up with the current one. `alpha` — Implemented with tests. The API may still change. `beta` — Feature complete and at parity. Only fixes are expected. `stable` — Covered by semantic versioning. `deprecated` — Still shipped; scheduled for removal.

### Anatomy

- `container`: The round area behind each mark that carries hover, focus and press: the state layer is drawn on it. One per mark, side by side with no space between them.
- `mark`: The glyph of one step of the score (star by default), drawn filled while it is within the value and outlined while it is not; a half value draws its last mark filled on its start half only.
- `focus-ring`: Gap-then-ring indicator around the focused mark's container (around every mark while the rating is a slider, RAT-4).

### Props

| Prop | Type | Default | Web attribute | Description |
| --- | --- | --- | --- | --- |
| `value` | `number` | `0` | `value` | The score: a number of marks from 0 to max, in whole marks or, while allowHalf is true, in halves. 0 is no score yet. |
| `max` | `number` | `5` | `max` | How many marks are drawn: the highest score. A whole number from 1. |
| `allowHalf` | `boolean` | `false` | `allow-half` | Lets a person give a score that ends on a half mark: a press on the start half of a mark gives that mark less a half, and the arrow keys move by a half. A read-only rating shows halves whatever it says (RAT-14). |
| `size` | `enum`: `small`, `medium`, `large` | `"medium"` | `size` | The size of each mark (20 / 24 / 32) and of the round area behind it (28 / 32 / 40). The hit area always meets the minimum target. A design system may add values. |
| `icon` | `string` | `""` | `icon` | The name of the glyph of one mark in the system's icon set (favorite, thumb_up); empty draws star. One glyph for every mark; the filled and the outlined forms are the icon set's two fills. |
| `label` | `string` | `""` | `label` | Names the rating for assistive technology ("Your rating of this recipe"). Required. Never drawn: a visible question beside the rating is the product's, and uses the same words. |
| `optionLabels` | `strings` | `` | `option-labels` | The name of each score a person can give, in ascending order from the lowest (one mark, or a half mark while allowHalf is true): ["Poor", "Fair", "Good", "Very good", "Excellent"]. Empty names each score by its number, written as the platform writes a number in the language of the element. |
| `valueText` | `string` | `""` | `value-text` | How assistive technology reads a read-only rating's score ("4.5 out of 5 stars"), in the product's language. Empty reads the score's name from optionLabels, or its number. |
| `readOnly` | `boolean` | `false` | `read-only` | Shows a score that cannot be changed — an average, a review's score — as one image with a name: not focusable and not pressable. |
| `disabled` | `boolean` | `false` | `disabled` | Shows the rating as unavailable: drawn in the disabled colors, not focusable, taking no input and left out of form submission. |

### Events

| Event | Description |
| --- | --- |
| `change` | The person changed the score: a press on a mark or a key. Carries the new value. Not emitted when the product sets value. |
| `preview` | A fine pointer moved onto a mark, or off the rating: carries the score the pointer would give, or null when it leaves, so that the product can show that score's words while the person points ("Very good"). |

### States

`enabled`, `disabled`, `hovered`, `focused`, `pressed`

### Accessibility

- Role: `radiogroup of radios (whole marks, up to 7); slider (half marks, or more than 7 marks); img (read-only)`
- Labeling: label names the radio group, the slider or the read-only image. Each radio is named by its entry in optionLabels or by its number; the slider's value text is the entry for its value, or the platform reads the number. A read-only rating is described by valueText. The marks' glyphs are decorative.
- Minimum target size: yes

| Keys | Action |
| --- | --- |
| Tab / Shift+Tab | Moves focus to the rating — to the checked mark, or to the first mark while there is no score — and out of it. One stop. |
| Right Arrow / Down Arrow (radio group) | Checks the next mark, wrapping from the last to the first; Left Arrow in a right-to-left layout. |
| Left Arrow / Up Arrow (radio group) | Checks the previous mark, wrapping from the first to the last; Right Arrow in a right-to-left layout. |
| Space (radio group) | Checks the focused mark when none is checked. A press on the checked mark changes nothing: a score is never taken back to none. |
| Right Arrow / Up Arrow, Left Arrow / Down Arrow (slider) | Raises or lowers the score by one step (a half where halves are allowed), between one step and max. |
| Page Up / Page Down (slider) | Raises or lowers the score by one whole mark. |
| Home / End (slider) | Sets the lowest score (one step) or the highest (max). |
| Enter | Submits the form the rating stands in, as in a native radio; it sets no score. |

- WAI-ARIA APG: a radio group suits up to seven choices; with more, a slider's keys make choosing faster (the Rating Slider example). Five whole stars are five radios (the Rating Radio Group example); five stars in halves are ten choices, so the rating is a slider (RAT-3, RAT-4).
- There is no way to take a score back to none once given, by any input, as there is none in a radio group. A product whose form needs it places a Button beside the rating that sets value to 0.
- The unselected mark is drawn in comp.rating.unselected.mark.color, outline in the default system: a functional boundary of at least 3:1 against the surface, so that the marks not given can be counted (WCAG 1.4.11). The filled and outlined forms differ in shape as well as color (WCAG 1.4.1).
- Neighbouring marks share their extended hit areas by distance (RAT-8): at size medium each mark has 32 of the row's width, above the 24 that WCAG 2.5.8 asks.

### Behaviour

Requirements in EARS form, each with its stable id.

- **RAT-1** THE rating SHALL draw max marks in a row from its inline-start edge, each the glyph icon names (star WHILE icon is empty) at comp.rating.mark.size.medium for size medium (and so on for each size), centred in a round container comp.rating.container.size.medium across (and so on), with the containers touching: the marks within value SHALL be drawn from the selected condition — sys.icon.family.selected, sys.icon.fill.selected and comp.rating.selected.mark.color — and the others from the unselected condition — sys.icon.family.unselected, sys.icon.fill.unselected and comp.rating.unselected.mark.color — with sys.icon.weight and an optical size clamped between sys.icon.optical-size.min and sys.icon.optical-size.max.
- **RAT-2** WHILE value ends on a half mark THE rating SHALL draw that mark twice in its place — from the selected condition clipped to its inline-start half and from the unselected condition clipped to its inline-end half, divided at the glyph's centre line — so that one mark reads as half filled, its filled half on the right WHERE the layout direction is right-to-left.
- **RAT-3** WHILE readOnly is false, disabled is false, allowHalf is false and max is at most 7 THE rating SHALL be a radio group named by label, each mark a radio named by its entry in optionLabels or, WHILE optionLabels has no entry for it, by its score written as the platform writes a number in the language of the element, checked WHILE its score equals value, with one stop in the focus order: the checked mark, or the first mark WHILE value is 0; THE rating SHALL answer the keys as a radio group does (RGP-5, RGP-6) — Right Arrow and Down Arrow check the next mark, Left Arrow and Up Arrow the previous one, both wrapping, Left and Right exchanged WHERE the layout direction is right-to-left, Space checks the focused mark — and emit change once for each change of value.
- **RAT-4** WHILE readOnly is false, disabled is false, and allowHalf is true or max is above 7 THE rating SHALL be one slider named by label, from 0 to max, with value as its current value and as its value text the entry of optionLabels for value or, WHILE there is none, nothing, so that the platform reads the number; it SHALL be one stop in the focus order and SHALL answer the keys as a slider does: Right Arrow and Up Arrow raise the value by one step — a half while allowHalf is true, a whole mark otherwise — and Left Arrow and Down Arrow lower it, never below one step and never above max (Right and Left exchanged WHERE the layout direction is right-to-left), Page Up and Page Down by one whole mark, Home to one step and End to max, and emit change once for each change of value.
- **RAT-5** WHILE readOnly is true and disabled is false THE rating SHALL draw its value as RAT-1 and RAT-2 say, SHALL take no press, no key and no focus, and SHALL expose itself as one image named by label and described by valueText or, WHILE valueText is empty, by the entry of optionLabels for value or else value written as the platform writes a number in the language of the element; WHILE value is 0 it SHALL be described as such by valueText alone, and in debug builds SHALL report a read-only rating with neither valueText nor a value above 0.
- **RAT-6** WHEN the user presses a mark by pointer or touch, or Space on a focused mark (RAT-3), WHILE readOnly and disabled are false THE rating SHALL set value to that mark's score — to that mark less a half WHILE allowHalf is true and the press lands on the mark's inline-start half — and WHEN that differs from value emit change once with the new value; a press on the mark of the score already given SHALL change nothing, so that no input takes a score back to 0.
- **RAT-7** WHILE a fine pointer is over a mark and readOnly and disabled are false THE rating SHALL draw every mark as RAT-1 and RAT-2 would draw them for the score the pointer would give (RAT-6), with that mark's container in its hovered state, and emit preview with that score each time it changes; WHEN the pointer leaves the rating THE rating SHALL draw its value again and emit preview once with null.
- **RAT-8** WHERE a mark's container is below the minimum target THE rating SHALL extend that mark's hit area on both axes to sys.target.touch for touch input and sys.target.pointer for fine pointers, without changing its visual size; a platform that cannot tell the input type SHALL use sys.target.touch; WHERE the hit areas of neighbouring marks overlap, a point SHALL belong to the mark whose centre is nearer, so that the row is divided at the middle between marks.
- **RAT-9** WHEN a mark is pressed by pointer, touch or Space THE rating SHALL show the pressed state on that mark's container without delay and SHALL keep it visible for at least sys.motion.duration.press-hold, even when the press ends sooner.
- **RAT-10** WHILE pressed THE rating SHALL answer as sys.behavior.pressed-feedback names: overlay applies the pressed tokens to the whole container at once; ripple grows the pressed state layer from the point of contact (from the center for keyboard activation); dim applies the pressed opacity to the whole control and draws no state layer; none draws no answer to the press. Under ripple and dim only the container color stays with the state under the press; mark, opacity and shape still come from the pressed tokens. Under none every part stays with the state under the press. The ripple grows over comp.rating.motion.feedback-duration with motion.state-easing, fades over motion.state-duration with motion.state-easing once the press has ended and press-hold has passed, and appears whole where motion is reduced.
- **RAT-11** THE rating SHALL ease its container corners by sys.shape.corner-smoothing (0 is a quarter circle, 0.6 the iOS continuous corner; a platform with only the OS curve draws it for any amount above 0) and show its keyboard focus as sys.behavior.focus-style names (ring or glow) — around the focused mark's container while it is a radio group, around the row of containers while it is a slider — at sys.focus.offset, never for focus gained by pointer; a platform that cannot draw a choice SHALL fall back to the first value and state that in its README.
- **RAT-12** WHEN value changes THE rating SHALL change each mark between its unselected and its selected form over comp.rating.motion.selection-duration with comp.rating.motion.selection-easing, as a fade between the two forms, going on from the form then shown WHEN it changes again during the motion (MOT-2), and SHALL change its containers' state colors over comp.rating.motion.state-duration with comp.rating.motion.state-easing; THE rating SHALL draw its first frame at its value without a motion (MOT-3), and WHERE motion is reduced the fades stay (MOT-6).
- **RAT-13** WHILE disabled is true THE rating SHALL render its containers and marks from the disabled tokens of each mark's condition, SHALL NOT be focusable or take any input, SHALL emit nothing, SHALL expose its disabled state and its value to assistive technology, and SHALL be left out of form submission.
- **RAT-14** WHEN the product sets value THE rating SHALL draw the new value and SHALL NOT emit change; IF value is below 0 or above max THE rating SHALL draw and expose it clamped to that range, and IF it is not a multiple of a half, or not a whole number while allowHalf is false and the rating is not read-only, SHALL draw and expose the nearest score it can show — a read-only rating shows halves whatever allowHalf says, so that an average is drawn to the nearest half; IF max is not a whole number from 1 THE rating SHALL take the whole number below it and at least 1; in each case debug builds SHALL report the value.
- **RAT-15** WHERE the platform has forms (the web) THE rating SHALL take part in them as a native control does: it takes name, submits value WHILE it is above 0 and nothing WHILE it is 0, restores it on navigation and resets to the value it was first given, and Enter while it has focus submits its form as Enter in a native radio does; WHILE readOnly is true it SHALL submit its value, and WHILE disabled is true nothing.
- **RAT-16** WHERE the layout direction is right-to-left THE rating SHALL draw its first mark at the right, the score growing leftward, and SHALL draw the glyph mirrored as RAT-19 says; it SHALL take its layout direction from where it is used and have no direction setting of its own.
- **RAT-17** WHERE the platform draws with a person's own forced colors THE rating SHALL draw every mark in the platform's text color — the selected form filled and the unselected form outlined, so that the score is read from the shapes and not from a color — the hovered mark's container in the platform's highlight color, and a disabled rating in the platform's disabled text color.
- **RAT-18** WHILE label is empty THE rating SHALL still render and in debug builds report that it has no accessible name; WHILE optionLabels is not empty and does not hold exactly one entry for each score a person can give THE rating SHALL use the entries it has, name the others by their numbers, and in debug builds report the count; WHEN size names a value the active design system does not have THE rating SHALL render with medium's tokens and in debug builds report the unknown value; WHILE icon names no glyph of the system's icon set THE rating SHALL draw star and in debug builds report the name.
- **RAT-19** WHERE the layout direction is right-to-left THE rating SHALL draw the glyph of its marks mirrored left to right exactly when the system's icon set marks that glyph's name as mirrored or — for the glyph icon names — the product forces mirroring for that use, and unmirrored when the product forbids it: the icon helper mirrors the glyph inside each mark's box, about the box's vertical centre line, changing neither the marks' places, sizes and colors nor the halves RAT-2 draws. The star the rating draws while icon is empty is its own glyph and takes no word of the product's. THE rating SHALL NOT mirror a mark itself.
- **RAT-20** WHEN the control height (dial.control.height) changes THE rating SHALL keep its own size: a mark's container (comp.rating.container.size.medium, and so on for each size) is the pitch of a row of glyphs, which follows the size of its mark (comp.rating.mark.size.medium, and so on), and no control of a row's height, so THE rating SHALL draw its containers and marks at their own sizes at every control height; a person's reach is the hit area's, which SHALL still meet the minimum target around each mark (RAT-8), not a wider pitch between the marks.

### Tokens

As written in the token documents (DTCG): an alias in braces names the token it takes its value from, which each design system resolves. On the web each token is a CSS custom property: `--tanrei` and the name after `tanrei`, joined by hyphens (`tanrei.comp.rating.…` → `--tanrei-comp-rating-…`).

#### `tanrei.comp.rating`

| Token | Type | Value |
| --- | --- | --- |
| `comp.rating.mark.size.small` | `dimension` | `{tanrei.sys.icon.small}` |
| `comp.rating.mark.size.medium` | `dimension` | `{tanrei.sys.icon.medium}` |
| `comp.rating.mark.size.large` | `dimension` | `{tanrei.sys.icon.large}` |
| `comp.rating.container.size.small` | `dimension` | `28px` |
| `comp.rating.container.size.medium` | `dimension` | `32px` |
| `comp.rating.container.size.large` | `dimension` | `40px` |
| `comp.rating.container.shape` | `dimension` | `{tanrei.sys.shape.corner.full}` |
| `comp.rating.unselected.container.color` | `color` | `{"colorSpace":"srgb","components":[0,0,0],"alpha":0,"hex":"#000000"}` |
| `comp.rating.unselected.mark.color` | `color` | `{tanrei.sys.color.outline}` |
| `comp.rating.unselected.state-layer.color` | `color` | `{tanrei.comp.rating.unselected.mark.color}` |
| `comp.rating.selected.container.color` | `color` | `{"colorSpace":"srgb","components":[0,0,0],"alpha":0,"hex":"#000000"}` |
| `comp.rating.selected.mark.color` | `color` | `{tanrei.sys.color.primary}` |
| `comp.rating.selected.state-layer.color` | `color` | `{tanrei.comp.rating.selected.mark.color}` |
| `comp.rating.motion.state-duration` | `duration` | `{tanrei.sys.motion.role.state.compact}` |
| `comp.rating.motion.state-easing` | `cubicBezier` | `{tanrei.sys.motion.easing.state}` |
| `comp.rating.motion.selection-duration` | `duration` | `{tanrei.sys.motion.role.selection.mark}` |
| `comp.rating.motion.selection-easing` | `cubicBezier` | `{tanrei.sys.motion.easing.state}` |
| `comp.rating.motion.feedback-duration` | `duration` | `{tanrei.sys.motion.role.feedback}` |

Per-state tokens, valued by the design system's pattern rules (not written by hand):

- `comp.rating.<variant>.<state>.<property>` for the variants `unselected`, `selected`, the states `hovered`, `focused`, `pressed`, `disabled` and the properties `container.color`, `mark.color`, `state-layer.color`.
- `comp.rating.<state>.<property>` for the states `hovered`, `focused`, `pressed`, `disabled` and the properties `opacity`, `container.shape`.

## ガイドライン

### 使う場面

レシピ、商品、宿泊のレビューのように、短い尺度で点数を付けてもらうときに使います。一覧に並べた商品のレビューの平均点のように、付いた点数を示すときにも使います。印の並びがそのまま尺度になるので、印がいくつあり、いくつ付いているかがひと目でわかります。

選択肢が 1 つの尺度の段階ではなく言葉であるなら、[ラジオグループ](https://tanrei.chnotchy.com/ja/components/radio-group.md)を使います。長い範囲や連続した範囲の値には[スライダー](https://tanrei.chnotchy.com/ja/components/slider.md)を使います。

### 印 1 つ単位と半分単位

| 設定 | 付けられる点数 | 支援技術から見えるもの |
| --- | --- | --- |
| 印 1 つ単位、7 個まで | 印ごとに 1 つの点数 | ラジオグループ。印ごとに 1 つのラジオで、矢印キーで次または前の印を選びます |
| 半分単位、または 8 個以上 | 最大値までの半分ごと（または印ごと）の点数 | スライダー。矢印キーで 1 段階、Page Up と Page Down で印 1 つ、Home と End で両端に動きます |
| 読み取り専用 | なし | 1 枚の画像。ラベルが名前、値のテキストが説明になります |

半分単位は、その細かさが必要な場合にだけ許可します。5 つ星を半分単位にすると選択肢は 10 になり、付けるのに時間がかかります。読み取り専用のレーティングは常に半分単位で描くので、4.3 のような平均点は 4 つ半の印になります。正確な値は値のテキストで伝えます。

### サイズの選び方

| サイズ | 既定のシステムでの印 / 丸い領域 | 用途 |
| --- | --- | --- |
| Small | 20 / 28 | 一覧の行、小さなテキストの横。 |
| Medium | 24 / 32 | フォーム。既定値です。 |
| Large | 32 / 40 | 商品のページのように、その画面の主役である点数。 |

どのサイズでも、各印はタッチターゲットを丸ごと持ちます。隣り合う印は、その間の領域を真ん中で分け合います。

### 点数を取り消す

レーティングには、付けた点数をなしに戻す操作がありません。ポインターでも、キーでも、支援技術でもできません。付いている点数の印を押しても何も変わりません。ラジオグループに選択を外す操作がないのと同じです。点数を取り下げられるようにする必要があるフォームでは、レーティングの横に、値を 0 にする Text のボタンを置きます。

### 推奨

- 何を評価するのかがわかるラベルを付けます。「このレシピの評価」のようにします。横に質問を表示するなら、同じ言葉を使います。
- 段階に意味があるなら（「悪い」「最高」）、`optionLabels` で各点数にプロダクトの言語で名前を付けます。ポインターを置いている間は、その言葉をレーティングの横に出します（`preview`）。
- 読み取り専用のレーティングには、点数を正確に伝える値のテキストを付けます。「5 つ星中 4.3、レビュー 128 件」のようにします。

### 非推奨

- 1 つの尺度の段階ではない選択肢に、レーティングを使わない。
- 星の色だけに頼らない。既定のシステムは、付いた印を塗りつぶし、それ以外を線で描くので、点数は形から読めます。色を変えるときも、この違いは残します。
- ひと目で数えられないほど多くの印を使わない。読みやすいのは 10 個までです。

## アクセシビリティ

### コンポーネントが担うこと

- 印 1 つ単位で 7 個までなら、ラベルを名前とするラジオグループになります。各印は、`optionLabels` の項目、またはページの言語で書いた数を名前とするラジオです。フォーカスが止まる位置は 1 つで、選ばれている印、点数がなければ最初の印です。矢印キーで次または前の印を選び、端では反対側に回ります。Space でフォーカスのある印を選び、Enter でフォームを送信します。
- 半分単位、または 8 個以上なら、0 から最大値までの 1 つのスライダーになります。値のテキストは、その点数に当たる `optionLabels` の項目です。矢印キーで 1 段階、Page Up と Page Down で印 1 つ、Home で 1 段階、End で最大値に動きます。
- 読み取り専用なら、ラベルを名前とし、値のテキストで説明される 1 枚の画像になります。フォーカスも押すこともできません。
- 各印のヒット領域は、描かれるものを変えずに最小ターゲットまで広がります。隣り合う印は、その間の真ん中で分かれます。
- 点数の内側の印は塗りつぶし、それ以外は線で描くので、点数が色だけに頼ることはありません。線の印はサーフェスに対して 3:1 を保ちます。強制カラーモードでは、すべての印をテキストの色で描きます。
- 無効のときは無効の色で描き、フォーカスできず、入力を受け付けず、フォームから外れます。点数は伝え続けます。
- 空のラベル、長さの合わない `optionLabels`、描けない値、未知のサイズ、説明のない読み取り専用のレーティングは、デバッグビルドで報告します。

### 利用者側で行うこと

- すべてのレーティングにラベルを、読み取り専用のものには値のテキストを付けます。
- `optionLabels` と `valueText` の言葉は、プロダクトの言語で書きます。
- 点数を取り下げられるようにするなら、そのためのボタンを用意します。レーティングには取り消す操作がありません。
