Files
mini-yu/uni_modules/tdesign-uniapp/components/rate/README.en-US.md
lingxiao865 c5af079d8c first commit
2026-02-10 08:05:03 +08:00

1.5 KiB
Raw Blame History

:: BASE_DOC ::

API

Rate Props

name type default description required
custom-style Object - CSS(Cascading Style Sheets) N
allow-half Boolean false - N
color String / Array '#ED7B2F' Typescriptstring | Array<string> N
count Number 5 - N
disabled Boolean undefined - N
gap String / Number 8 - N
icon String / Array - Typescriptstring | string[] N
icon-prefix String undefined - N
placement String top options: top / bottom / '' N
show-text Boolean false - N
size String / Number '24px' - N
texts Array [] TypescriptArray<string> N
value Number 0 v-model:value is supported N
default-value Number 0 uncontrolled property N
variant String outline options: outline/filled N

Rate Events

name params description
change (context: { value: number }) -

Rate External Classes

className Description
t-class -
t-class-icon -
t-class-text -

CSS Variables

The component provides the following CSS variables, which can be used to customize styles.

Name Default Value Description
--td-rate-icon-scale 1.33 -
--td-rate-selected-color @warning-color -
--td-rate-text-active-color @text-color-primary -
--td-rate-text-active-font-weight 600 -
--td-rate-text-color @text-color-disabled -
--td-rate-text-font-size @font-size-m -
--td-rate-unselected-color @component-border -