Skip to content

SectionDTO

The SectionDTO type defines a section within a form, grouping related fields together and allowing for section-specific layout and headings.

Properties

NameTypeDescription
idstringUnique identifier for the section.
headingstring?Section heading text (optional).
headingFontSizenumber?Font size for the heading in rem units (optional).
descriptionstring?Description text for the section (optional).
descriptionFontSizenumber?Font size for the description in rem units (optional).
layoutLayoutDTO?Layout configuration for the section (optional).
fieldsFieldDTO[]Array of field definitions for this section.

Example

ts
const section: SectionDTO = {
  id: "contact",
  heading: "Contact Details",
  headingFontSize: 1.5,
  description: "How can we reach you?",
  layout: { cols: 2, gap: "0.5rem" },
  fields: [
    { id: "email", type: "email", label: "Email Address", required: true },
    { id: "phone", type: "text", label: "Phone Number" }
  ]
};