File upload
- Data type: File
- JSON Schema data type: N/A
Create a file field component that can be added to the form.
Example
- Code
- Example
import React from "react";
import { createForm, fileField, StatefulFormView } from "@fab4m/fab4m";
import "@fab4m/fab4m/css/basic/basic.css";
const form = createForm({
name: fileField({
label: "File upload",
required: true,
}),
});
export default function FileFieldExample() {
return <StatefulFormView form={form} hideSubmit={true} />;
}