logoAnt Design

⌘ K
  • 디자인
  • 개발
  • 컴포넌트
  • 블로그
  • 자료
5.21.3
  • Components Overview
  • General
    • Button
    • FloatButton
      5.0.0
    • Icon
    • Typography
  • Layout
    • Divider
    • Flex
      5.10.0
    • Grid
    • Layout
    • Space
    • Splitter
      5.21.0
  • Navigation
    • Anchor
    • Breadcrumb
    • Dropdown
    • Menu
    • Pagination
    • Steps
  • Data Entry
    • AutoComplete
    • Cascader
    • Checkbox
    • ColorPicker
      5.5.0
    • DatePicker
    • Form
    • Input
    • InputNumber
    • Mentions
    • Radio
    • Rate
    • Select
    • Slider
    • Switch
    • TimePicker
    • Transfer
    • TreeSelect
    • Upload
  • Data Display
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Collapse
    • Descriptions
    • Empty
    • Image
    • List
    • Popover
    • QRCode
      5.1.0
    • Segmented
    • Statistic
    • Table
    • Tabs
    • Tag
    • Timeline
    • Tooltip
    • Tour
      5.0.0
    • Tree
  • Feedback
    • Alert
    • Drawer
    • Message
    • Modal
    • Notification
    • Popconfirm
    • Progress
    • Result
    • Skeleton
    • Spin
    • Watermark
      5.1.0
  • Other
    • Affix
    • App
      5.1.0
    • ConfigProvider
    • Util
      5.13.0

Rate

Used for rating operation on something.
가져오기import{ Rate }from"antd";
소스components/rate
문서
이 페이지 수정변경 로그

Resources

Ant Design Charts
Ant Design Pro
Ant Design Pro Components
Ant Design Mobile
Ant Design Mini
Ant Design Landing-Landing Templates
Scaffolds-Scaffold Market
Umi-React Application Framework
dumi-Component doc generator
qiankun-Micro-Frontends Framework
ahooks-React Hooks Library
Ant Motion-Motion Solution
China Mirror 🇨🇳

Community

Awesome Ant Design
Medium
Twitter
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference
Work with Us

Help

GitHub
Change Log
FAQ
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community
loading

When To Use

  • Show evaluation.
  • A quick rating operation on something.

Examples

API

Common props ref:Common props

PropertyDescriptiontypeDefaultVersion
allowClearWhether to allow clear when click againbooleantrue
allowHalfWhether to allow semi selectionbooleanfalse
autoFocusIf get focus when component mountedbooleanfalse
characterThe custom character of rateReactNode | (RateProps) => ReactNode<StarFilled />function(): 4.4.0
classNameThe custom class name of ratestring-
countStar countnumber5
defaultValueThe default valuenumber0
disabledIf read only, unable to interactbooleanfalse
keyboardSupport keyboard operationbooleantrue5.18.0
styleThe custom style object of rateCSSProperties-
tooltipsCustomize tooltip by each characterstring[]-
valueThe current valuenumber-
onBlurCallback when component lose focusfunction()-
onChangeCallback when select valuefunction(value: number)-
onFocusCallback when component get focusfunction()-
onHoverChangeCallback when hover itemfunction(value: number)-
onKeyDownCallback when keydown on componentfunction(event)-

Methods

NameDescription
blur()Remove focus
focus()Get focus

Design Token

글로벌 토큰어떻게 사용하나요?

Basic
codepen icon
External Link Icon
expand codeexpand code
Show copywriting
codepen icon
External Link Icon
expand codeexpand code
Clear star
codepen icon
External Link Icon
expand codeexpand code
Customize character
codepen icon
External Link Icon
expand codeexpand code
Half star
codepen icon
External Link Icon
expand codeexpand code
Read only
codepen icon
External Link Icon
expand codeexpand code
Other Character
codepen icon
External Link Icon
expand codeexpand code
Component Token
codepen icon
External Link Icon
expand codeexpand code
normal
allowClear: true
allowClear: false
  • 1
    1
  • 2
    2
  • 3
    3
  • 4
    4
  • 5
    5
  • A
    A
  • A
    A
  • A
    A
  • A
    A
  • A
    A
  • 好
    好
  • 好
    好
  • 好
    好
  • 好
    好
  • 好
    好