Skip to content

feat(VRating): expose activeColor in item slot props#22738

Open
mixelburg wants to merge 1 commit intovuetifyjs:masterfrom
mixelburg:fix/vrating-activecolor-slot-prop
Open

feat(VRating): expose activeColor in item slot props#22738
mixelburg wants to merge 1 commit intovuetifyjs:masterfrom
mixelburg:fix/vrating-activecolor-slot-prop

Conversation

@mixelburg
Copy link
Copy Markdown
Contributor

Fixes #22273

Currently only color is passed to the #item slot, even though activeColor is a distinct prop that gets resolved separately. This makes it hard to use activeColor for custom rendering without manually re-deriving it from props.

The activeColor is already computed in itemState — this just includes it in the returned object so it shows up in the slot payload alongside color.

Before:

<VRating>
  <template #item="{ color, props, isFilled }">
    <!-- activeColor not available here -->
  </template>
</VRating>

After:

<VRating active-color="red" color="grey">
  <template #item="{ color, activeColor, isFilled, props }">
    <VIcon :color="isFilled ? activeColor : color" v-bind="props" />
  </template>
</VRating>

@J-Sek
Copy link
Copy Markdown
Contributor

J-Sek commented Mar 20, 2026

  • features go to dev branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add activeColor to #item slot props for VRating

2 participants