Inkline is the intuitive UI Components library that gives you a developer-friendly foundation for building high-quality, accessible, and customizable Vue.js 3 Design Systems.
useForm
composable is now type safe and requires a base type that determines the shape of your formuseForm
composable:
schema
- the resolved schema with all validation fieldsform
- the serialized form values, computed based on the schemavalidate
- a function to validate the schema on demandtouched
when submitting.usePrompt
promise now resolves to the serialized form
instead of the schemauseModal
and usePrompt
display: flex
const { form, schema, validate } = useForm<{
field: string;
group: {
nested: number;
};
array: string[];
arrayGroup: Array<{ field: string }>;
}>({
field: {
value: 'abc',
validators: ['required']
},
group: {
nested: {
value: 123,
validators: []
}
},
array: [
{ value: 'abc' }
],
arrayGroup: [
{
field: {
value: 'abc'
}
}
]
});
Breaking changes
IToastContainer
no longer needs to be added manually