# Types: StoreFormProps to ContactFormProps (/themes/sdk/reference/forms/types-2)

```ts
import { … } from '@poltura/theme-sdk/forms';
```

## `StoreFormProps` [#storeformprops]

Props of [`StoreForm`](/themes/sdk/reference/forms/defaults#storeform).

<TypeTable type={{"handle":{"description":"The handle of the published form, such as `contact`.","type":"string","required":true},"children":{"description":"Your own fields and buttons; the form's fields and send button when omitted.","type":"ReactNode","required":false},"layout":{"description":"How the fields sit.","type":"StoreFormLayout","required":false},"appearance":{"description":"The surface the form draws on.","type":"StoreFormAppearance","required":false},"chrome":{"description":"Whether the title and card draw; `full` when omitted.","type":"StoreFormChrome","required":false},"copy":{"description":"The theme's own wording.","type":"StoreFormCopy","required":false},"fieldVisibility":{"description":"Fields to hide or show by field id, over the merchant's settings.","type":"Readonly<Record<string, boolean>>","required":false},"emailHints":{"description":"Shows deliverability hints under email fields; a domain that takes no mail blocks sending.","type":"boolean","required":false},"onAccepted":{"description":"Called once the store accepted a submission; `preview` is true in the customizer.","type":"(submissionId: string, preview: boolean) => void","required":false},"className":{"description":"Classes added to the form's card.","type":"string","required":false}}} />

## `FormFieldRender` [#formfieldrender]

What a [`FormField`](/themes/sdk/reference/forms/parts#formfield) render function receives.

<TypeTable type={{"field":{"description":"The field.","type":"StoreFormFieldView","required":true},"value":{"description":"The field's value.","type":"FormValue","required":true},"error":{"description":"The field's error, or null.","type":"string | null","required":true},"describedBy":{"description":"The id of the error line, for `aria-describedby`.","type":"string","required":true},"setValue":{"description":"Sets the field's value.","type":"(value: FormValue) => void","required":true}}} />

## `FormFieldProps` [#formfieldprops]

Props of [`FormField`](/themes/sdk/reference/forms/parts#formfield).

<TypeTable type={{"id":{"description":"The field id.","type":"string","required":true},"children":{"description":"Draws your own control; the platform control when omitted.","type":"(field: FormFieldRender) => ReactNode","required":false}}} />

## `FieldControlProps` [#fieldcontrolprops]

Props of [`FieldControl`](/themes/sdk/reference/forms/parts#fieldcontrol).

<TypeTable type={{"field":{"description":"The field to draw.","type":"StoreFormFieldView","required":true},"value":{"description":"The field's value.","type":"FormValue","required":true},"error":{"description":"The error to show, or null.","type":"string | null","required":false},"disabled":{"description":"Whether the control is disabled.","type":"boolean","required":false},"onChange":{"description":"Called with the new value.","type":"(value: FormValue) => void","required":true}}} />

## `SubmitButtonProps` [#submitbuttonprops]

Props of [`SubmitButton`](/themes/sdk/reference/forms/parts#submitbutton).

<TypeTable type={{"children":{"description":"The label; the form's send or next-step wording when omitted.","type":"ReactNode","required":false},"className":{"description":"Classes added to the button.","type":"string","required":false}}} />

## `FormDisplay` [#formdisplay]

Whether a form opens as a dialog or as a side panel.

```ts
type FormDisplay = 'popup' | 'drawer'
```

## `FormWidth` [#formwidth]

How wide an opened form is.

```ts
type FormWidth = 'compact' | 'standard' | 'wide'
```

## `OpenFormInput` [#openforminput]

A form to open in a dialog or side panel.

<TypeTable type={{"handle":{"description":"The handle of the published form.","type":"string","required":true},"display":{"description":"Dialog or side panel; `popup` when omitted.","type":"FormDisplay","required":false},"width":{"description":"How wide it opens; `standard` when omitted.","type":"FormWidth","required":false},"layout":{"description":"How the fields sit.","type":"StoreFormLayout","required":false},"appearance":{"description":"The surface the form draws on.","type":"StoreFormAppearance","required":false}}} />

## `FormActions` [#formactions]

The actions that open a published form over the page.

<TypeTable type={{"openForm":{"description":"Opens the form; focus returns to `trigger` when it closes.","type":"(input: OpenFormInput, trigger?: HTMLElement | null) => void","required":true},"preloadForm":{"description":"Starts loading a form, so it opens without a wait.","type":"(handle: string) => void","required":true}}} />

## `FormTriggerProps` [#formtriggerprops]

Props of [`FormTrigger`](/themes/sdk/reference/forms/parts#formtrigger).

<TypeTable type={{"handle":{"description":"The handle of the published form.","type":"string","required":true},"display":{"description":"Dialog or side panel; `popup` when omitted.","type":"FormDisplay","required":false},"width":{"description":"How wide it opens; `standard` when omitted.","type":"FormWidth","required":false},"layout":{"description":"How the fields sit.","type":"StoreFormLayout","required":false},"appearance":{"description":"The surface the form draws on.","type":"StoreFormAppearance","required":false},"children":{"description":"The button label.","type":"ReactNode","required":false},"className":{"description":"Classes added to the button.","type":"string","required":false}}} />

## `FormPopupFrequency` [#formpopupfrequency]

How often a form that opens by itself opens again for one visitor: once ever, once a session, or after 30 days.

```ts
type FormPopupFrequency = 'once' | 'session' | 'days'
```

## `FormPopupProps` [#formpopupprops]

Props of [`FormPopup`](/themes/sdk/reference/forms/parts#formpopup).

<TypeTable type={{"handle":{"description":"The handle of the published form.","type":"string","required":true},"display":{"description":"Dialog or side panel; `popup` when omitted.","type":"FormDisplay","required":false},"width":{"description":"How wide it opens; `standard` when omitted.","type":"FormWidth","required":false},"layout":{"description":"How the fields sit.","type":"StoreFormLayout","required":false},"appearance":{"description":"The surface the form draws on.","type":"StoreFormAppearance","required":false},"delaySeconds":{"description":"Seconds after the page opens before the form does; at least 5.","type":"number","required":true},"frequency":{"description":"How often it opens again for the same visitor.","type":"FormPopupFrequency","required":true}}} />

## `NewsletterTexts` [#newslettertexts]

The newsletter wording, from the theme settings over the platform's own, and the store's consent sentence.

<TypeTable type={{"heading":{"description":"The heading.","type":"string","required":true},"description":{"description":"The line under the heading.","type":"string","required":true},"button":{"description":"The sign-up button.","type":"string","required":true},"consent":{"description":"The store's marketing consent sentence; theme settings do not change it.","type":"string","required":true}}} />

## `NewsletterState` [#newsletterstate]

Whether the store takes newsletter sign-ups, and the wording to ask with.

<TypeTable type={{"enabled":{"description":"Whether the store collects newsletter sign-ups.","type":"boolean","required":true},"visible":{"description":"Whether the theme shows the newsletter; false when the merchant switched it off in the theme.","type":"boolean","required":true},"doubleOptIn":{"description":"Whether a sign-up must confirm by email before it counts.","type":"boolean","required":true},"formHandle":{"description":"The handle of the newsletter form.","type":"string","required":true},"texts":{"description":"The wording in the page language.","type":"NewsletterTexts","required":true}}} />

## `NewsletterLayout` [#newsletterlayout]

Where a newsletter form sits, which decides its look.

```ts
type NewsletterLayout = 'inline' | 'stacked' | 'footer' | 'section'
```

## `NewsletterFormProps` [#newsletterformprops]

Props of [`NewsletterForm`](/themes/sdk/reference/forms/defaults#newsletterform).

<TypeTable type={{"layout":{"description":"`inline` and `stacked` draw the form alone; `footer` adds the footer heading, `section` a full-width band.","type":"NewsletterLayout","required":false},"appearance":{"description":"The surface the form draws on, for `inline` and `stacked`.","type":"StoreFormAppearance","required":false},"chrome":{"description":"Whether the title and card draw, for `inline` and `stacked`.","type":"StoreFormChrome","required":false},"copy":{"description":"The theme's own wording, for `inline` and `stacked`.","type":"StoreFormCopy","required":false},"onAccepted":{"description":"Called once a sign-up was accepted; `preview` is true in the customizer.","type":"(submissionId: string, preview: boolean) => void","required":false},"className":{"description":"Classes added to the form.","type":"string","required":false}}} />

## `NewsletterTriggerProps` [#newslettertriggerprops]

Props of [`NewsletterTrigger`](/themes/sdk/reference/forms/parts#newslettertrigger).

<TypeTable type={{"display":{"description":"Dialog or side panel; `popup` when omitted.","type":"FormDisplay","required":false},"width":{"description":"How wide it opens.","type":"FormWidth","required":false},"children":{"description":"The button label.","type":"ReactNode","required":false},"className":{"description":"Classes added to the button.","type":"string","required":false}}} />

## `ContactFormProps` [#contactformprops]

Props of [`ContactForm`](/themes/sdk/reference/forms/defaults#contactform); every wording falls back to the platform's own.

<TypeTable type={{"formTitle":{"description":"The form title.","type":"string","required":false},"formSubtitle":{"description":"The line under the title.","type":"string","required":false},"showName":{"description":"Whether the name field shows; true when omitted.","type":"boolean","required":false},"showSubject":{"description":"Whether the subject field shows; true when omitted.","type":"boolean","required":false},"nameLabel":{"description":"The name label.","type":"string","required":false},"namePlaceholder":{"description":"The name placeholder.","type":"string","required":false},"emailLabel":{"description":"The email label.","type":"string","required":false},"emailPlaceholder":{"description":"The email placeholder.","type":"string","required":false},"subjectLabel":{"description":"The subject label.","type":"string","required":false},"subjectPlaceholder":{"description":"The subject placeholder.","type":"string","required":false},"messageLabel":{"description":"The message label.","type":"string","required":false},"messagePlaceholder":{"description":"The message placeholder.","type":"string","required":false},"submitLabel":{"description":"The send button.","type":"string","required":false},"successTitle":{"description":"The heading after sending.","type":"string","required":false},"successMessage":{"description":"The message after sending.","type":"string","required":false},"newMessageLabel":{"description":"The button that starts a new message.","type":"string","required":false}}} />
