# li-rating-stars

<!-- Auto Generated Below -->

## Properties

| Property               | Attribute                | Description                                                                                 | Type                   | Default                       |
| ---------------------- | ------------------------ | ------------------------------------------------------------------------------------------- | ---------------------- | ----------------------------- |
| `ariaLabelTranslation` | `aria-label-translation` | 为A11Y提供明确含义的提示文本,其中的$max 和 $rating在方法：getRatingText中替换为对应的变量值 | `string`               | `评为$max星级中的$rating星级` |
| `disabled`             | `disabled`               | 是否禁用 {boolean}                                                                          | `boolean \| undefined` | `false`                       |
| `hideLabel`            | `hide-label`             | 是否隐藏标签 {boolean}                                                                      | `boolean`              | `false`                       |
| `infoText`             | `info-text`              | 可选属性 信息文本 {string}                                                                  | `string \| undefined`  | `undefined`                   |
| `label`                | `label`                  | 标签 {string}                                                                               | `string`               | `'评级'`                      |
| `max`                  | `max`                    | 评级的上限 {number}                                                                         | `number`               | `5`                           |
| `rating`               | `rating`                 | 当前的评定等级 {number}                                                                     | `number`               | `0`                           |
| `readonly`             | `readonly`               | 让当前的评级结果只读 {boolean}                                                              | `boolean`              | `false`                       |
| `size`                 | `size`                   | 星星的大小 {('small' \| 'large')}                                                           | `"large" \| "small"`   | `'large'`                     |

## Events

| Event       | Description                                                                            | Type               |
| ----------- | -------------------------------------------------------------------------------------- | ------------------ |
| `li-change` | ---------------------------------- 5.自定义事件部分 ---------------------------------- | `CustomEvent<any>` |

## Shadow Parts

| Part                 | Description |
| -------------------- | ----------- |
| `"container"`        |             |
| `"content"`          |             |
| `"infotext"`         |             |
| `"label"`            |             |
| `"placeholder-star"` |             |
| `"range-slider"`     |             |
| `"selected-star"`    |             |
| `"star"`             |             |
| `"wrapper"`          |             |

## Dependencies

### Depends on

- [li-icon-action-favorite](../icons/action-favorite)

### Graph

```mermaid
graph TD;
  li-rating-stars --> li-icon-action-favorite
  style li-rating-stars fill:#f9f,stroke:#333,stroke-width:4px
```

---

_Built with ITSI_
