βΒ Β Read-only Star Rating Component
Submitted by Gabriel Vidal
Summary
A read-only Star rating using htbuilder for Streamlit.
Functions
star_rating
Renders a read-only star rating component using htbuilder for Streamlit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rating
|
float
|
A number in the range [0, 5] representing the rating to be displayed. It can include half values like 2.5, and will be rounded to the nearest half-integer. |
required |
color
|
str
|
The color of the stars. Defaults to gold ("#FFD700"). |
'#FFD700'
|
Source code in src/streamlit_extras/star_rating/__init__.py
Import:
- You should add this to the top of your .py file