@vuecs/forms
@vuecs/forms
The complete form-input family of vuecs — accessible inputs on Reka UI primitives with a clean v-model contract, validation feedback, and a shared FormOption shape across every picker.
✨ What's inside
- ⌨️ Text & numbers —
<VCFormInput>,<VCFormTextarea>,<VCFormNumber>(typed, with steppers),<VCFormPin>(PIN/OTP). - ✅ Toggles —
<VCFormCheckbox>(incl.indeterminate),<VCFormCheckboxGroup>,<VCFormSwitch>,<VCFormRadio>/<VCFormRadioGroup>. - 📋 Pickers —
<VCFormSelect>,<VCFormSelectSearch>,<VCFormTags>, all driven by the sameFormOption<T>shape ({ value, label, disabled?, icon?, … }) +FormOptionGroup<T>. - 🎚️
<VCFormSlider>— single value or range from one component; thumb count derives from thev-modelshape. - 🧪 Validation feedback — wrap any input in
<VCFormGroup>: it renders label + messages and folds anerror/warningseverity onto the input's theme variant automatically, with zero per-input wiring. - 🌐 i18n-ready defaults — placeholders, labels, and validation copy resolve through
@vuecs/core's behavioral-defaults pipeline (reactiveMaybeRefvalues welcome). - 🚀
useSubmitButton()(experimental) — a reactive bind-object for create/update submit buttons on@vuecs/button.
📦 Installation
npm install @vuecs/forms
⚡ Usage
<VCFormGroup label-content="Email" :validation-messages="errors.email">
<VCFormInput v-model="form.email" type="email" />
</VCFormGroup>
<VCFormSelect
v-model="form.role"
:options="[
{ value: 'admin', label: 'Administrator' },
{ value: 'user', label: 'User' },
]"
placeholder="-- Select a role --"
/>
<VCFormSlider v-model="priceRange" :min="0" :max="500" /> <!-- range: v-model is number[] -->
📚 Documentation
One page per component on vuecs.dev:
Input · Textarea · Number · Pin · Checkbox · Switch · Radio · Select · SelectSearch · Slider · Tags
Guide: Validation feedback
🔄 Migrating from @vuecs/form-controls (≤2.x)
@vuecs/form-controls was renamed to @vuecs/forms in 3.0 — a clean break, no shim:
VCFormInputCheckboxsplit into<VCFormCheckbox>/<VCFormCheckboxGroup>/<VCFormSwitch>(distinct ARIA semantics).VCFormRangeMultiSliderreplaced by<VCFormSlider>(one component, single + range).FormSelectOption({ id, value }) replaced byFormOption<T>({ value, label, … }); theoptionDefault*triplet collapsed into oneplaceholderprop.- New Reka-backed components: Radio, Pin, Number, Tags.
VCFormSubmitdecomposed into<VCButton>+useSubmitButton().
License
Made with 💚
Published under Apache 2.0 License.
Related Packages
@vue-layout/hyperscript
A package containing hyperscript components for usage in render functions.
1,245
4
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 5.4.2 | ^3.x | Apache-2.0 | |
| 5.4.1 | ^3.x | Apache-2.0 | |
| 5.4.0 | ^3.x | Apache-2.0 | |
| 5.3.3 | ^3.x | Apache-2.0 | |
| 5.3.2 | ^3.x | Apache-2.0 | |
| 5.3.1 | ^3.x | Apache-2.0 | |
| 5.3.0 | ^3.x | Apache-2.0 | |
| 5.2.3 | ^3.x | Apache-2.0 | |
| 5.2.2 | ^3.x | Apache-2.0 | |
| 5.2.1 | ^3.x | Apache-2.0 | |
| 5.2.0 | ^3.x | Apache-2.0 | |
| 5.1.1 | ^3.x | Apache-2.0 | |
| 5.1.0 | ^3.x | Apache-2.0 | |
| 5.0.1 | ^3.x | Apache-2.0 | |
| 5.0.0 | ^3.x | Apache-2.0 | |
| 4.0.1 | ^3.x | Apache-2.0 | |
| 4.0.0 | ^3.x | Apache-2.0 |