IFFDAYIFFDAYDesign
Film and community

RatingInput

A rating input for forms: a star preview beside a dropdown.

import { RatingInput } from '@iffday/web/src/components';

Example

The five stars on the left only preview the value; the dropdown on the right is the input, with No rating and half a star to five stars, 11 options. The stars cannot be clicked, which suits a form that submits the rating with other fields.

Usage

To rate by clicking stars on a film page, use StarRating. onChange receives half stars from 1 to 10, or null for No rating.

Props

PropTypeDefault
value*number | null
onChange*(value: number | null) => void