---
title: "Star Rating Fill"
description: "A token-driven star row whose colored layer sweeps to a rating, preserves the fractional final star, and can count the value in sync."
---
import { InstallCommand } from "/snippets/install-command.jsx";
import { VariablesExplorer } from "/snippets/variables-explorer.jsx";
```html star-rating-fill.html
Star Rating Fill
```
## Install
That writes one file: `compositions/components/star-rating-fill.html`.
## Paste it into your composition
Open `compositions/components/star-rating-fill.html` and copy what is inside into your own composition.
A component has no size or duration of its own. It takes both from the composition
you paste it into.
## Variables
Every one of these has a default, so the piece works untouched. Set the ones you
want to change on the element:
| Variable | Default | Accepts | What it does |
| --- | --- | --- | --- |
| `rating` | `4.8` | 0 to 5, step 0.1 | Target rating in star units from 0 to 5. |
| `starCount` | `5` | 1 to 10, step 1 | Number of stars shown in the row. |
| `showValue` | `yes` | `yes`, `no` | Show or hide the synchronized numeric rating. |
Set them with `data-variable-values` on the element that mounts it. These are the
defaults, so this behaves exactly like the preview above until you change one:
```html wrap
```
## Source
```html
Star Rating Fill
```
{/* hf:generated-footer */}
Tagged `data` `rating` `stars` `fractional` `fill` `prove`.
## Related topics
- [Browse the complete Catalog](/catalog)
- [Add assets and Catalog items in Studio](/studio/assets-and-blocks)
- [Build a richer composition](/go-further)