# Rating

Star rating control with read-only display + interactive input modes. Half-star increments by default, keyboard support (Arrow / Home / End), and an `aria-label` describing the current value. Always renders LTR so 1-star sits at the start edge in both reading directions.

[View examples](https://marsam.rahhal.app/components/rating) · [Agent index](https://marsam.rahhal.app/llms.txt)

**Import:** `@rahhal/ui/rating`

**Category:** `feedback`

## Modes

- **Read-only** (default when `onChange` is omitted, or when `readOnly`): `role="img"`, no keyboard interaction.
- **Interactive**: `role="slider"`, focusable, supports Arrow / Home / End keys plus mouse hover preview.

## Props

| prop | type | purpose |
| --- | --- | --- |
| value | number | current rating (0..max) |
| max | number | default 5 |
| step | 0.5 | 1 | smallest increment; default 0.5 for half-stars |
| onChange | (next) => void | fires on click / keyboard |
| readOnly | boolean | force display-only mode |
| size | sm | md | lg | star size |
| label | ReactNode | optional trailing label (`"4.6 / 5"`) |
