Namespace: Types

Types

Global Types

This is a collection of hubspot-fields-js types that are used to generete fields (json) for HubSpot modules and themes.

Source:

Type Definitions

ADVANCED_VISIBILITY

Advanced visibility

Type:
  • Object
Properties:
Name Type Attributes Description
boolean_operator 'AND' | 'OR'

OR The boolean operator for the conditional criteria. Can be AND or OR

advanced_visibility.criteria Array.<ADVANCED_VISIBILITY_CRITERIA> <optional>

An array of visibility objects that defines the conditional criteria that needs to be met for the field to display.

advanced_visibility.children Array.<ADVANCED_VISIBILITY> <optional>
Source:

ADVANCED_VISIBILITY_CRITERIA

Advanced visibility criteria

Type:
  • Object
Properties:
Name Type Attributes Description
controlling_field_path string <optional>

Path of the field that controls the display condition

operator 'NOT_EQUAL' | 'EQUAL' | 'EMPTY' | 'NOT_EMPTY' | 'MATCHES_REGEX'
controlling_value_regex string <optional>

The regular expression in the controlling field that needs to be present for the field to display.

property string <optional>

Sets visibility based on a specific property (src, name)

Source:

ALIGNMENT_FIELD

alignment field properties

Type:
  • Object
Properties:
Name Type Attributes Description
alignment_direction 'HORIZONTAL' | 'VERTICAL' | 'BOTH' <optional>
default Object <optional>
Properties
Name Type Attributes Description
horizontal_align 'LEFT' | 'CENTER' | 'RIGHT' <optional>
vertical_align 'TOP' | 'MIDDLE' | 'BOTTOM' <optional>
Source:

AUDIO_FIELD

Audio field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default Object <optional>
Properties
Name Type Attributes Description
file_id number <optional>
file_duration number <optional>
file_extension string <optional>
file_url string <optional>
title string <optional>
Source:

BACKGROUND_IMAGE_FIELD

backgroundimage field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default Object <optional>
Properties
Name Type Attributes Description
src string <optional>
background_position 'TOP_LEFT' | 'TOP_CENTER' | 'TOP_RIGHT' | 'MIDDLE_LEFT' | 'MIDDLE_CENTER' | 'MIDDLE_RIGHT' | 'BOTTOM_LEFT' | 'BOTTOM_CENTER' | 'BOTTOM_RIGHT' <optional>
background_size 'COVER' | 'CONTAIN' | 'AUTO' <optional>
Source:

BASE_FIELDS

Base field properties

Type:
  • Object
Properties:
Name Type Attributes Description
display_width 'half_width' <optional>

Side by side fields

help_text string <optional>

Display help text

inline_help_text string <optional>
<nullable>

Display help text inline

required boolean <optional>

Make the field required

locked boolean <optional>

Hide the field from the user

inherited_value Object <optional>

Inherited value options

Properties
Name Type Attributes Description
default_value_path string <optional>
property_value_paths Object <optional>
Properties
Name Type Attributes Description
color string <optional>
occurrence Object <optional>

Repeated fields options

Properties
Name Type Attributes Description
min number <optional>

Minimum number of repeated fields

max number <optional>
<nullable>

Maximum number of repeated fields

sorting_label_field string <optional>

Field to sort the repeated fields

default number <optional>
<nullable>

Default number of repeated fields

visibility Object <optional>

Display conditions

Properties
Name Type Attributes Description
controlling_field_path string <optional>
<nullable>

Path of the field that controls the display condition

controlling_value_regex string <optional>
<nullable>

The regular expression in the controlling field that needs to be present for the field to display.

operator 'NOT_EQUAL' | 'EQUAL' | 'EMPTY' | 'NOT_EMPTY' | 'MATCHES_REGEX' | null <optional>
property string <optional>
<nullable>

Sets visibility based on a specific property (src, name)

hidden_subfields HIDDEN_SUBFIELDS <optional>

Hide subfields of a field. For example, you can hide the margin from spacing field and show only the padding. Ony works for Theme settings fields.

visibility_rules 'ADVANCED' <optional>
advanced_visibility ADVANCED_VISIBILITY <optional>

To include multiple criteria with multiple operators, as well as order of operations, you can use advanced_visibility.

Source:

BLOG_FIELD

Blog field properties

Type:
  • Object
Properties:
Name Type Attributes Description
placeholder string <optional>
default number | Array.<number> <optional>
Source:

BOOLEAN_FIELD

boolean field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default boolean <optional>
display 'toggle' | 'checkbox' <optional>
Source:

BORDER_FIELD

border field properties

Type:
  • Object
Properties:
Name Type Attributes Description
allow_custom_border_sides boolean <optional>
default Object <optional>
Properties
Name Type Attributes Description
border_radius Object <optional>
Properties
Name Type Description
value number
units CSS_UNIT
top BORDER_SIDE_TYPE <optional>
right BORDER_SIDE_TYPE <optional>
bottom BORDER_SIDE_TYPE <optional>
left BORDER_SIDE_TYPE <optional>
Source:

BORDER_SIDE_TYPE

border field properties

Type:
  • Object
Properties:
Name Type Attributes Description
width Object <optional>
Properties
Name Type Description
value number
units CSS_UNIT
opacity number <optional>
style 'none' | 'solid' | 'dashed' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' <optional>
color string <optional>
Source:

CHILDRENS

textalignment field properties

Type:
Source:

CHOICE_FIELD

choice field properties

Type:
  • Object
Properties:
Name Type Attributes Description
choices Array.<Array.<string>>
default string | number | Array.<(string|number)> <optional>
display 'radio' | 'select' | 'checkbox' <optional>
multiple boolean <optional>
reordering_enabled boolean <optional>
placeholder string <optional>
preset string <optional>

https://developers.hubspot.com/beta-docs/reference/cms/fields/module-theme-fields#choice-button-presets

Source:

COLOR_FIELD

color field properties

Type:
  • Object
Properties:
Name Type Attributes Description
show_opacity boolean <optional>
default Object | Array.<Object> <optional>
Properties
Name Type Attributes Description
color string <optional>
css string <optional>
hex string <optional>
opacity number <optional>
rgb string <optional>
rgba string <optional>
Source:

CRM_OBJECT_FIELD

CRMobject field properties

Type:
  • Object
Properties:
Name Type Attributes Description
object_type 'COMPANY' | 'CONTACT' | 'TICKET' | 'QUOTE' | 'PRODUCT' | 'MARKETING EVENT' | 'DEAL'
properties_to_fetch Array.<string> <optional>
displayFormat string <optional>
display_properties Array.<string> <optional>
placeholder string <optional>
default Object <optional>
Properties
Name Type Attributes Description
id number <optional>
Source:

CRM_OBJECT_PROPERTY_FIELD

CRMobjectProperty field properties

Type:
  • Object
Properties:
Name Type Attributes Description
object_type 'COMPANY' | 'CONTACT' | 'TICKET' | 'QUOTE' | 'PRODUCT' | 'MARKETING EVENT' | 'DEAL'
placeholder string <optional>
default Object <optional>
Properties
Name Type Attributes Description
property string <optional>
Source:

CTA_FIELD

cta field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default string <optional>
Source:

DATA_AND_TIME_FIELD

DataAndTime field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default number <optional>
step number <optional>
Source:

DATE_FIELD

Date field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default number <optional>
Source:

EMAIL_ADDRESS_FIELD

EmailAddress field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default Array.<string> <optional>
allow_custom_email_addresses boolean <optional>
Source:

EMBEDED_FIELD

Embeded field properties

Type:
  • Object
Properties:
Name Type Attributes Description
supported_source_types Array.<('oembed'|'html'|'media_bridge')> <optional>
supported_oembed_types Array.<('photo'|'video'|'link'|'rich')> <optional>
supported_media_bridge_providers Array.<number> <optional>
resizable boolean <optional>
show_preview boolean <optional>
default Object <optional>
Properties
Name Type Attributes Description
source_type 'oembed' | 'html' | 'media_bridge' <optional>
oembed_string string <optional>
oembed_response Object <optional>
size_type 'auto' | 'auto_custom_max' | 'auto_full_width' | 'exact' <optional>
width number <optional>
height number <optional>
max_width number <optional>
max_height number <optional>
embed_type string <optional>
media_bridge_object Object <optional>
Source:

FILE_FIELD

File field properties

Type:
  • Object
Properties:
Name Type Attributes Description
picker 'file' | 'image' | 'video' | 'document' | 'audio'
default string <optional>
Source:

FONT_FIELD

font field properties

Type:
  • Object
Properties:
Name Type Attributes Description
load_external_fonts boolean <optional>
default Object <optional>
Properties
Name Type Attributes Description
font string
font_set 'DEFAULT' | 'GOOGLE' | 'CUSTOM' <optional>
google_font_variants Array.<FONT_VARIANTS_FIELD> <optional>
size number <optional>
size_unit CSS_UNIT <optional>
color string <optional>
styles TEXT_STYLES <optional>
variant string <optional>
fallback string <optional>
Source:

FONT_VARIANTS_FIELD

FontVariants field properties

Type:
  • '100' | '100i' | '200' | '200i' | '300' | '300i' | '400' | '400i' | '500' | '500i' | '600' | '600i' | '700' | '700i' | '800' | '800i' | '900' | '900i'
Source:

FORM_FIELD

Form field properties

Type:
  • Object
Properties:
Name Type Attributes Description
allow_inline_form_editing boolean <optional>
disable_inline_form_editing boolean <optional>
default Object <optional>
Properties
Name Type Attributes Description
form_id string <optional>
form_type 'HUBSPOT' | 'TICKET_FORM' <optional>
response_type 'inline' | 'redirect' <optional>
message string <optional>
redirect_id number <optional>
redirect_url string <optional>
workflow_id Array.<number> <optional>
Source:

GRADIENT_COLOR_TYPE

GradientColorType field properties

Type:
  • Object
Properties:
Name Type Description
color Object
Properties
Name Type Description
r string
g string
b string
a number
Source:

GRADIENT_FIELD

gradient field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default Object <optional>
Properties
Name Type Attributes Description
side_or_corner Object <optional>
Properties
Name Type Attributes Description
verticalSide 'TOP' | 'BOTTOM' <optional>
horizontalSide 'LEFT' | 'RIGHT' <optional>
colors Array.<GRADIENT_COLOR_TYPE> <optional>
Source:

GROUP_FIELD

Group field properties

Type:
  • Object
Properties:
Name Type Attributes Description
expanded boolean <optional>

Show the group expanded

default Array.<any> | Object <optional>
Source:

HIDDEN_SUBFIELDS

Hidden subfields properties

Type:
  • Object
Properties:
Name Type Attributes Description
margin boolean <optional>
padding boolean <optional>
bold boolean <optional>
italic boolean <optional>
underline boolean <optional>
color boolean <optional>
size boolean <optional>
Source:

HTML_FIELD

HTML field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default string <optional>
Source:

HUBDB_ROW_FIELD

HubDbRow field properties

Type:
  • Object
Properties:
Name Type Attributes Description
table_name_or_id string | number
columns_to_fetch Array.<string> <optional>
display_format string <optional>
display_columns Array.<string> <optional>
placeholder string <optional>
default Object <optional>
Properties
Name Type Attributes Description
id number <optional>
Source:

HUBDB_TABLE_FIELD

HubDbTable field properties

Type:
  • Object
Properties:
Name Type Attributes Description
placeholder string <optional>
default string | number <optional>
Source:

HUBL_FIELD

HUBL field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default string <optional>
Source:

ICON_FIELD

icon field properties

Type:
  • Object
Properties:
Name Type Attributes Description
set 'fontawesome-5' | 'fontawesome-5.0.10' | 'fontawesome-5.14.0' | 'fontawesome-6.4.2' <optional>
default Object <optional>
Properties
Name Type Attributes Description
name string <optional>
type 'SOLID' | 'REGULAR' <optional>
unicode string <optional>
Source:

IMAGE_FIELD

image field properties

Type:
  • Object
Properties:
Name Type Attributes Description
resizable boolean <optional>
responsive boolean <optional>
show_loading boolean <optional>
default Object <optional>
Properties
Name Type Attributes Description
src string <optional>
alt string <optional>
width number <optional>
height number <optional>
max_width number <optional>
max_height number <optional>
size_type 'auto' | 'auto_custom_max' | 'auto_full_width' | 'exact' <optional>
loading 'disabled' | 'eager' | 'lazy' <optional>
Source:
Type:
  • Object
Properties:
Name Type Attributes Description
placeholder string <optional>
show_advanced_rel_options boolean <optional>
supported_types Array.<URL_TYPES> <optional>
default Object <optional>
Properties
Name Type Attributes Description
url Object <optional>
Properties
Name Type Attributes Description
type URL_TYPES <optional>
content_id number <optional>
href string <optional>
open_in_new_tab boolean <optional>
no_follow boolean <optional>
sponsored boolean <optional>
user_generated_content boolean <optional>
Source:

LOGO_FIELD

Logo field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default Object <optional>
Properties
Name Type Attributes Description
src string <optional>
alt string <optional>
width number <optional>
height number <optional>
override_inherited_src boolean <optional>
loading string <optional>
suppress_company_name boolean <optional>
show_loading boolean
Source:

MEETING_FIELD

Meeting field properties

Type:
  • Object
Properties:
Name Type Attributes Description
embeddable boolean <optional>
placeholder string <optional>
default string <optional>
Source:

MENU_FIELD

Type:
  • Object
Properties:
Name Type Attributes Description
placeholder string <optional>
default number | string <optional>
Source:

NUMBER_FIELD

number field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default number | Array.<number> | null <optional>
prefix string <optional>
suffix string <optional>
min number <optional>
max number <optional>
step number <optional>
display 'text' | 'slider' <optional>
format 'ANY' | 'INTEGER' <optional>
placeholder string <optional>
Source:

PAGE_FIELD

Page field properties

Type:
  • Object
Properties:
Name Type Attributes Description
placeholder string <optional>
default number | Array.<number> <optional>
Source:

PAYMENT_FIELD

Payment field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default Object <optional>
Properties
Name Type Attributes Description
id number <optional>
Source:

PODCAST_FIELD

podcast field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default Object <optional>
Properties
Name Type Attributes Description
episode_id number <optional>
show_id number <optional>
Source:

PRODUCT_FIELD

Product field properties

Type:
  • Object
Source:

RICHTEXT_FIELD

richtext field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default string <optional>
enabled_features Array.<RICH_TEXT_FEATURES> <optional>
Source:

RICH_TEXT_FEATURES

RichTextFeatures field properties

Type:
  • 'block' | 'font_family' | 'font_size' | 'bold' | 'italic' | 'underline' | 'text_color' | 'background_color' | 'alignment' | 'bulleted_list' | 'numbered_list' | 'lineheight' | 'outdent' | 'indent' | 'strikethrough' | 'superscript' | 'subscript' | 'code_format' | 'link' | 'image' | 'emoji' | 'personalize' | 'cta' | 'embed' | 'video' | 'table' | 'charmap' | 'anchor' | 'hr' | 'nonbreaking_space' | 'source_code' | 'visual_blocks' | 'colors' | 'fonts' | 'indents' | 'lists' | 'standard_emphasis' | 'advanced_emphasis'
Source:

SIMPLE_MENU_FIELD

Simple menu field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default Array.<{}> <optional>
Source:

SPACING_FIELD

spacing field properties

Type:
  • Object
Properties:
Name Type Attributes Description
limits Object <optional>
Properties
Name Type Attributes Description
padding Object <optional>
Properties
Name Type Attributes Description
top SPACING_LIMIT_TYPE <optional>
right SPACING_LIMIT_TYPE <optional>
bottom SPACING_LIMIT_TYPE <optional>
left SPACING_LIMIT_TYPE <optional>
margin Object <optional>
Properties
Name Type Attributes Description
top SPACING_LIMIT_TYPE <optional>
right SPACING_LIMIT_TYPE <optional>
bottom SPACING_LIMIT_TYPE <optional>
left SPACING_LIMIT_TYPE <optional>
default Object <optional>
Properties
Name Type Attributes Description
padding Object <optional>
Properties
Name Type Attributes Description
top SPACING_LIMIT_TYPE <optional>
right SPACING_LIMIT_TYPE <optional>
bottom SPACING_LIMIT_TYPE <optional>
left SPACING_LIMIT_TYPE <optional>
margin Object <optional>
Properties
Name Type Attributes Description
top SPACING_LIMIT_TYPE <optional>
right SPACING_LIMIT_TYPE <optional>
bottom SPACING_LIMIT_TYPE <optional>
left SPACING_LIMIT_TYPE <optional>
Source:

SPACING_LIMIT_TYPE

SpacingLimitType field properties

Type:
  • Object
Properties:
Name Type Description
min number
max number
units Array.<CSS_UNIT>
Source:

SPACING_VALUE_TYPE

SpacingValueType field properties

Type:
  • Object
Properties:
Name Type Description
value number
units CSS_UNIT
Source:

TAG_FIELD

Tag field properties

Type:
  • Object
Properties:
Name Type Attributes Description
tagValue 'SLUG' | 'NAME' | 'ID' | 'ALL'
default string | number | Object <optional>
Source:

TEXT_ALIGNMENT_FIELD

textalignment field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default Object <optional>
Properties
Name Type Attributes Description
text_align 'LEFT' | 'CENTER' | 'RIGHT' | 'JUSTIFY' <optional>
Source:

TEXT_FIELD

Text field properties

Type:
  • Object
Properties:
Name Type Attributes Description
default string <optional>
validation_regex string <optional>

Regular expression to validate the field

validation_error_message string <optional>

Error message to display when the field does not match the regular expression

placeholder string <optional>

Placeholder text

allow_new_line boolean <optional>

Allow new line

show_emoji_picker boolean <optional>

Show emoji picker

Source:

URL_FIELD

url field properties

Type:
  • Object
Properties:
Name Type Attributes Description
supportedTypes Array.<URL_TYPES>
default Object <optional>
Properties
Name Type Attributes Description
type URL_TYPES <optional>
href string <optional>
content_id number <optional>
supported_types Array.<URL_TYPES> <optional>
Source:

URL_TYPES

URL types

Type:
  • 'EXTERNAL' | 'CONTENT' | 'FILE' | 'EMAIL_ADDRESS' | 'BLOG' | 'CALL_TO_ACTION' | 'WHATSAPP_NUMBER' | 'PHONE_NUMBER' | 'PAYMENT'
Source:

VIDEO_FIELD

video field properties

Type:
  • Object
Properties:
Name Type Attributes Description
resizable boolean <optional>
show_advanced_options boolean <optional>
show_preview boolean <optional>
default Object <optional>
Properties
Name Type Attributes Description
player_id number <optional>
width number <optional>
height number <optional>
max_width number <optional>
max_height number <optional>
size_type 'exact' | 'auto' | 'auto_custom_max' | 'auto_full_width' <optional>
player_type string <optional>
loop_video boolean <optional>
mute_by_default boolean <optional>
autoplay boolean <optional>
hide_controls boolean <optional>
conversion_asset any <optional>
Source:

Table of contents