Skip to main content
Vuetify0 is now in alpha!
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

Rating

Headless rating input with hover preview, keyboard navigation, and half-step support.


Renders elementIntermediateApr 5, 2026

Usage

Rating supports whole and half-star modes. Items expose their state via data attributes for CSS-only styling.

Star Rating

A 5-star rating with hover preview and filled/empty star display.

Rating: 0

Anatomy

vue
<script setup lang="ts">
  import { Rating } from '@vuetify/v0'
</script>

<template>
  <Rating.Root>
    <Rating.Item />

    <Rating.HiddenInput />
  </Rating.Root>
</template>

Examples

Basic

Click a star to set the rating. Hover to preview. Keyboard: Arrow keys to adjust, Home for 0, End for max.

Rating: 0

Half Stars

Enable half prop for 0.5-step precision. Hover over the left or right half of a star to preview half values.

Rating: 2.5

Accessibility

Keyboard

KeyAction
ArrowRight / ArrowUpIncrement by step (1 or 0.5)
ArrowLeft / ArrowDownDecrement by step
HomeSet to 0
EndSet to size

ARIA

Rating.Root provides role="slider" with aria-valuenow, aria-valuemin, aria-valuemax, and aria-valuetext (e.g. “3 out of 5”). When disabled or readonly, the corresponding aria-disabled and aria-readonly attributes are set.

Data Attributes

Root:

AttributeDescription
data-disabledPresent when disabled
data-readonlyPresent when readonly
data-hoveringPresent during hover

Item:

AttributeValuesDescription
data-statefull | half | emptyFill state
data-highlightedpresent/absentWithin hover range
data-disabledpresent/absentInherited from root
data-readonlypresent/absentInherited from root

API Reference

The following API details are for all variations of the Rating component.

Rating.Root

Props

modelValue

number | undefined

Current rating

Default: 0

size

number | undefined

Total items (default: 5)

Default: 5

half

boolean | undefined

Enable 0.5 increments

Default: false

disabled

MaybeRefOrGetter<boolean> | undefined

Disable interaction

Default: false

readonly

MaybeRefOrGetter<boolean> | undefined

Show value, prevent changes

name

string | undefined

Form field name — triggers hidden input

namespace

string | undefined

Namespace for context provision

Default: "v0:rating:root"

Slots

default

RatingRootSlotProps

Rating.HiddenInput

Props

namespace

string | undefined

Namespace for context injection from parent Rating.Root

Default: "v0:rating:root"

Rating.Item

Props

index required

number

1-based position

namespace

string | undefined

Namespace for context injection from parent Rating.Root

Default: "v0:rating:root"

Slots

default

RatingItemSlotProps
Was this page helpful?

© 2016-1970 Vuetify, LLC
Ctrl+/