You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update:modelValue is handled automatically by v-model / defineModel.
⌨️ Keyboard Navigation
Key
Action
→↑
Increase rating
←↓
Decrease rating
Home
Set to minimum
End
Set to maximum
1-9
Jump to specific value
0
Reset to minimum
🖥️ Exposed Methods
constratingRef=ref<InstanceType<typeofVueStarRate>>();ratingRef.value?.reset();// Reset to initial valueratingRef.value?.setRating(3.5);// Set programmaticallyratingRef.value?.getRating();// Get current valueratingRef.value?.focus();// Focus the componentratingRef.value?.blur();// Blur the component
🔄 Migrating from v2 to v3
Breaking Changes
v2.x
v3.x
modelValue prop
Managed by defineModel — template syntax unchanged
lucideIcons prop
Removed — use icon-provider="lucide" instead
role="slider" on container
role="group" — WCAG 2.2 compliant
animation: { scale: 1.15 }
animation: { type: 'scale' } — no numeric scale key
peerDependencies: vue ^3.3.0
peerDependencies: vue ^3.5.0
Options API data()/methods
Composition API + <script setup> / defineModel
Animation Migration
<!-- v2 — scale was never a valid AnimationConfig key -->
:animation="{ enabled: true, duration: 200, scale: 1.15 }"
<!-- v3 — use type instead -->
:animation="{ enabled: true, duration: 200, type: 'scale' }"
🛠️ Development
# Clone the repository
git clone https://github.com/pooyagolchian/vue-star-rate.git
cd vue-star-rate
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Run tests
pnpm test# Build for production
pnpm build
# Documentation development
pnpm docs:dev
# Build documentation
pnpm docs:build
🤝 Contributing
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.