InputRadioPanels.vue component is a reusable Vue.js component for selecting an option from a list presented as interactive panels. It supports two-way binding with v-model for managing the selected value and provides a detailed description and visual feedback for each option.
Features
Descriptive Options
Displays a name and description for each option in the list.
Interactive Panels
Offers a visually engaging interface with selectable panels.
Customizable Options
Allows passing a dynamic array of options with keys, names, and descriptions.
Usage
Basic Example
Dynamic Options
Props
Binds the currently selected option’s
key value.Array of option objects. Each object must include
key, name, and description fields.Example Use Cases
User Role Selection
Use theInputRadioPanels component to allow users to select a role:
Notes
- Validation: The
optionsprop is validated to ensure that each option includeskey,name, anddescriptionfields. - Two-Way Binding: The
v-modelprop ensures that the selected option is updated dynamically. - Interactive Design: The currently selected panel is visually distinct, providing immediate feedback to the user.