Skip to content
Playground Form Builder

Basic

Terminal window
npm i @sjsf/basic-theme@next

You can connect extra widgets using the following include imports:

// Used by default in the following fields: multiEnumField
import "@sjsf/basic-theme/extra-widgets/checkboxes-include"
import "@sjsf/basic-theme/extra-widgets/date-picker-include"
// Used by default in the following fields: fileField, filesField
import "@sjsf/basic-theme/extra-widgets/file-include"
import "@sjsf/basic-theme/extra-widgets/multi-select-include"
import "@sjsf/basic-theme/extra-widgets/radio-include"
import "@sjsf/basic-theme/extra-widgets/range-include"
import "@sjsf/basic-theme/extra-widgets/textarea-include"

checkbox oninput, onchange, onblur
checkboxes oninput, onchange, onblur
file onchange, onblur
multiFile onchange, onblur
number oninput, onchange, onblur
select oninput, onchange, onblur
text oninput, onchange, onblur
radio oninput, onchange, onblur
multiSelect oninput, onchange, onblur
textarea oninput, onchange, onblur
datePicker oninput, onchange, onblur
range oninput, onchange, onblur
import type {
HTMLAttributes,
HTMLButtonAttributes,
HTMLFormAttributes,
HTMLInputAttributes,
HTMLLabelAttributes,
HTMLSelectAttributes,
HTMLTextareaAttributes,
} from "svelte/elements";
import type { ButtonType, LayoutType } from "@sjsf/form/fields/components";
export interface UiOptions {
/**
* Overrides the attributes of any button component.
*/
button?: HTMLButtonAttributes;
/**
* Overrides the attributes of a button with a specific type.
* This override takes precedence over the `button` override, but does not replace it.
*/
buttons?: {
[B in ButtonType]?: HTMLButtonAttributes;
};
/**
* Overrides the attributes of the description.
*/
descriptionAttributes?: HTMLAttributes<HTMLDivElement>;
/**
* Overrides the attributes of the errors list.
*/
errorsList?: HTMLAttributes<HTMLUListElement>;
form?: HTMLFormAttributes;
/**
* Overrides the attributes of the help.
*/
helpAttributes?: HTMLAttributes<HTMLDivElement>;
/**
* Overrides the attributes of the field label.
*/
labelAttributes?: HTMLLabelAttributes;
/**
* Overrides the attributes of any layout component.
*/
layout?: HTMLAttributes<HTMLDivElement>;
/**
* Overrides the attributes of a layout with a specific type.
* This override takes precedence over the `layout` override, but does not replace it.
*/
layouts?: {
[L in LayoutType]?: HTMLAttributes<HTMLDivElement>;
};
submitButton?: HTMLButtonAttributes;
/**
* Overrides the attributes of the field title
*/
titleAttributes?: HTMLAttributes<HTMLDivElement>;
checkbox?: HTMLInputAttributes;
number?: HTMLInputAttributes;
select?: HTMLSelectAttributes;
text?: HTMLInputAttributes;
checkboxes?: HTMLInputAttributes;
datePicker?: HTMLInputAttributes;
file?: HTMLInputAttributes;
multiSelect?: HTMLSelectAttributes;
radio?: HTMLInputAttributes;
range?: HTMLInputAttributes;
textarea?: HTMLTextareaAttributes;
}