Kaoto - The Integration Designer for Apache Camel
Documentation | Workshops | Contribute | Chat
Kaoto forms are a library of reusable components that can be used to build forms in the Kaoto UI. They are designed to be flexible and easy to use, adapted to Apache Camel component schemas, allowing developers to create forms that can be used in different contexts.
import { KaotoForm } from '@kaoto/forms';
const schema = {
type: 'object',
properties: {
name: {
type: 'string',
title: 'Name',
description: 'The name of the integration',
},
description: {
type: 'string',
title: 'Description',
description: 'A brief description of the integration',
},
// Add more properties as needed
},
};
const model = {
name: 'My Integration',
description: 'This is a sample integration',
// Add more properties as needed
};
const handleOnChangeIndividualProp = (path: string, value: unknown) => {
console.log(`Property ${prop} changed to ${value}`);
// Handle the change event as needed
};
const onChange = (value: unknown) => {
console.log('Form changed:', value);
// Handle the form change event as needed
};
<KaotoForm
schema={schema}
model={model}
onChangeProp={handleOnChangeIndividualProp}
onChange={onChange}
/>