How mahmoud-nb/vue3-rating-input works
This is a Vue 3 star-rating input library. A host application imports or registers the component, supplies its value and options, and receives rating updates through v-model / update:modelValue. The component handles pointer and keyboard interaction, delegates pointer-position tracking, and renders each star through an SVG child. Accessibility modes, configurable appearance, half-star selection, and slots are capabilities of the component rather than separate subsystems. The graph is based on the README and sampled source; the example app is shown separately from the package entry point.
Main entry points: rating-input.vue Rating Input · StarSVG.vue Star SVG · index.ts Library Entry · globals.ts Rating Types
Components 8
Package API
- Library Entry
src/index.ts
Rating Interaction
- Rating Input
src/components/rating-input.vue - Mouse Observer
src/composables/observeMouse.ts
Star Rendering
- Star SVG
src/components/StarSVG.vue - SVG Definitions
src/composables/starDefs.ts
Shared Types
- Rating Types
src/types/globals.ts
Other components
- Host Application
- Example App
src/App.vue
Connections 10
- Host Application → Library Entry: imports or registers
README.md - Library Entry → Rating Input: exports and registers
src/index.ts - Host Application → Rating Input: sets value and options
README.md - Rating Input → Host Application: emits rating update
src/components/rating-input.vue - Rating Input → Mouse Observer: tracks pointer position
src/components/rating-input.vue - Rating Input → Star SVG: renders stars
src/components/rating-input.vue - Star SVG → SVG Definitions: injects shared symbols
src/components/StarSVG.vue - Rating Input → Rating Types: uses prop types
src/components/rating-input.vue - Star SVG → Rating Types: uses appearance types
src/components/StarSVG.vue - Example App → Rating Input: uses component
src/App.vue