Free
Pro

Star Ratings

Star rating is a way to give a rating to the content to show its quality or performance in different fields.

free

Review Mode

Use this example of the component to show the given review. The rating is not editable

4

Jane Lane

4


HTML

Edit Mode

Use this example of the component to give rating base on criteria

Quality
0
Communication
0
Timeline
0
Total
0

HTML


TypeScript

Installation

Run the following command to add this component to your project:

bash

npx base-ui-cli add star-rating

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.

bash

npx -y base-ui-mcp

Base UI provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)

// Install: npx base-ui-cli add star-rating
// Paths are relative to aliases.components (default: src/app/components)
import { StarRatingComponent } from './star-rating/star-rating.component';
import { StarComponent } from './star-rating/star/star.component';

@Component({
  selector: 'app-your-component',
  imports: [
    StarComponent,
    StarRatingComponent
  ],
  template: `...`
})
export class YourComponent {}

API for star-rating — generated from JSDoc in the library source.

API reference for star-rating
APIMemberTypeDefaultDescription
base-starratingnumber0The rating input property.
base-stareditablebooleanfalseThe editable input property.
base-star(ratingChanged)numberThe ratingChanged output property.
base-star-ratingariaLabelunknown'Rating'Accessible label for the star rating group.