UNPKG

angular-star

Version:

A lightweight and customizable **star rating** component for Angular 20+. Supports decimal ratings, hover interactions, read-only mode, and full accessibility.

34 lines (30 loc) 1.26 kB
import * as _angular_core from '@angular/core'; interface starType { length: number; value?: number; color?: string; badColor?: string; avgColor?: string; goodColor?: string; spaceBetween?: string | number; icon?: string; } declare class AngularStar { config: _angular_core.InputSignal<starType>; getValue: _angular_core.OutputEmitterRef<number>; protected defaultConfig: _angular_core.Signal<starType>; private fractions; protected rating: _angular_core.WritableSignal<number>; protected hoverFraction: _angular_core.WritableSignal<number>; private setValue; constructor(); protected onMouseMove(event: MouseEvent, index: number): void; protected resetHover(): void; protected rate(value: number): void; protected getFillPercentage(index: number): string; get classname(): "bad-color" | "avg-color" | "good-color"; static ɵfac: _angular_core.ɵɵFactoryDeclaration<AngularStar, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<AngularStar, "angular-star", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "getValue": "getValue"; }, never, never, true, never>; } export { AngularStar }; export type { starType };