• Get Started
    • Introduction
    • Installation
    • Theming
  • Layout
    • Drawer
    • Footer
    • Hero
    • Indicator
    • Join
    • Stack
    • Divider
  • Navigation
    • Breadcrumbs
    • Dock
    • Menu
    • Link
    • Navbar
    • Pagination
    • Steps
    • Tabs
  • Data Display
    • Accordion
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Chat
    • Collapse
    • Countdown
    • Diff
    • Kbd
    • List
    • Mask
    • Mockup
    • Stat
    • Table
    • Timeline
  • Feedback
    • Alert
    • Loading
    • Modal
    • Progress
    • Skeleton
    • Status
    • Toast
    • Tooltip
  • Forms
    • Button
    • Checkbox
    • Dropdown
    • File Input
    • Fieldset
    • Filter
    • Input
    • Label
    • Radio
    • Range
    • Rating
    • Select
    • Toggle
    • Textarea
  • Effects
    • Hover 3D Card
    • Hover Gallery
    • Speed Dial
    • Swap
    • Text Rotate
    • Theme Controller
jsx daisyUI

    No recently viewed docs

  • Get Started
    • Introduction
    • Installation
    • Theming
  • Layout
    • Drawer
    • Footer
    • Hero
    • Indicator
    • Join
    • Stack
    • Divider
  • Navigation
    • Breadcrumbs
    • Dock
    • Menu
    • Link
    • Navbar
    • Pagination
    • Steps
    • Tabs
  • Data Display
    • Accordion
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Chat
    • Collapse
    • Countdown
    • Diff
    • Kbd
    • List
    • Mask
    • Mockup
    • Stat
    • Table
    • Timeline
  • Feedback
    • Alert
    • Loading
    • Modal
    • Progress
    • Skeleton
    • Status
    • Toast
    • Tooltip
  • Forms
    • Button
    • Checkbox
    • Dropdown
    • File Input
    • Fieldset
    • Filter
    • Input
    • Label
    • Radio
    • Range
    • Rating
    • Select
    • Toggle
    • Textarea
  • Effects
    • Hover 3D Card
    • Hover Gallery
    • Speed Dial
    • Swap
    • Text Rotate
    • Theme Controller

© 2026 jsx-daisyui. All rights reserved. | Built with DaisyUI and React.

Rating

A rating input allows users to rate something using stars, hearts, or custom shapes.

Installation
npx jsx-daisyui add rating

Sizes

rating-sizes

Colors

rating-colors

Props

Rating

PropTypeDefaultDescription
namestring-Unique name used for the underlying radio inputs.
valuenumber-Controlled value (1-based index).
defaultValuenumber-Default value for uncontrolled usage.
onValueChange(value: number) => void-Called when the user picks a new rating.
disabledboolean-Disables all items.
readOnlyboolean-Renders divs instead of inputs (purely visual).
halfboolean-Enables half-star mode.
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'The size of the rating items.

Rating.Item

PropTypeDefaultDescription
itemIndexnumber-1-based index of this rating item.
mask'mask-star' | 'mask-star-2' | 'mask-heart' | 'mask-square' | 'mask-circle''mask-star-2'Mask shape class for the rating item shape.
colorstring'bg-orange-400'Tailwind bg-* color class for the item.
halfSide'first' | 'second'-For half-star mode: which half this item represents.
Orange
Green
Red
Blue
Purple