AsterUIDocsv1.0.2

Docs / Component reference

Rating

Choose a rating with the stars or use the arrow keys to adjust it.

Rating example

Install

sh
npx @fierst/ui@1.0.2 add rating

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/rating: Rating.

Download the registry source for rating 1.0.2.

API contracts

ts
export function* Rating(
  props: {
    value?: number;
    defaultValue?: number;
    max?: number;
    size?: number;
    readOnly?: boolean;
    showValue?: boolean;
    label?: string;
    onChange?: (rating: number) => void;
    class?: string;
  },
  ctx: Ctx,
)