Skip to content

Widget Definition Reference

This page documents every field of a widget entry in the widgets array of extensions_registry.json. For the root of the registry file, see Registry Reference.

Working example

The template repository contains a complete extensions_registry.json with example widgets, a global script, and a stylesheet — a useful reference alongside this documentation.

Widget Object

FieldTypeRequiredDefaultDescription
titlestringYesDisplay name shown to users
typestringYesUnique widget identifier — must be unique across your community
categorystringYesFree-form category label, e.g. "engagement", "analytics"
contentobjectConditionalExternal hosting — see Content Object. Required if source is not set.
sourceobjectConditionalRepository hosting — see Source Block. Required if content is not set.
versionstringNo"1.0.0"Widget version following semver
descriptionstringNo""Brief description of the widget
containersarray of stringsNo["Full width"]Page zones where the widget can be placed. Values: "Full width", "Left container", "Sidebar"
widgetsLibrarybooleanNotrueWhen true, the widget appears in the No-Code Builder library
imageNamestringNo"banner"Built-in thumbnail identifier — see Thumbnails. Ignored when imageSrc is set.
imageSrcstringNoCustom thumbnail — absolute URL or relative repository path. See Thumbnails. Mutually exclusive with imageName.
settingsobjectNoshared false, container false, others trueWidget behavior settings — see Settings Object
configurationobjectNoForm fields for the No-Code Builder — see Configuration Object
defaultConfigobjectNoDefault values for configuration properties

XOR Requirement: Each widget must have exactly one of content or source — never both, never neither.

Important: The type field is the widget's unique identifier. Use a descriptive, namespaced format like mycompany_welcome_banner to avoid conflicts with other widgets.

Settings Object

FieldTypeRequiredDefaultDescription
configurablebooleanNotrueWhether users can configure the widget after adding it
editablebooleanNotrueWhether the widget content can be edited
removablebooleanNotrueWhether users can remove the widget from pages
sharedbooleanNofalseWhen true, one widget instance is shared across every page it appears on — edits propagate everywhere. Opt in explicitly; the default keeps the widget local to each page.
movablebooleanNotrueWhether users can reposition the widget
containerbooleanNofalseWhether the widget acts as a container for other widgets

An empty settings: {} object is valid — all fields take their defaults.

Content Object

FieldTypeRequiredDefaultDescription
endpointstringYesPublic URL to widget content, must start with https://
methodstringNo"GET"HTTP method — "GET" or "POST"
cacheStrategystringNoCaching behavior — "none", "no-cache", "ttl", or "permanent"
cacheTtlSecondsintegerNoCache duration in seconds — use with cacheStrategy: "ttl"
requiresAuthenticationbooleanNofalseNot supported — leave false or omit
headersobjectNoOptional headers sent with the request
bodyobjectNoOptional request body, for POST
paramsobjectNoOptional query parameters

Source Block

FieldTypeRequiredDefaultDescription
pathstringYesDirectory path relative to repository root
entrystringYesHTML entry point file relative to path

Configuration Object

FieldTypeRequiredDefaultDescription
propertiesarray of objectsYesForm fields — see ConfigField Object

ConfigField Object

FieldTypeRequiredDefaultDescription
namestringYesField identifier, used as the configuration key
labelstringYesField label shown in the No-Code Builder
typestringYesField type — "text", "number", "color", "date", "boolean", or "select"
descriptionstringNoHelp text shown under the field
defaultValueanyNoPre-filled value
rulesobjectNoValidation rules — see FieldRules Object
optionsarrayNoOnly for "select" type — see SelectOption Object
FieldRules Object
FieldTypeRequiredDefaultDescription
requiredbooleanNoWhether the field must be filled in
minLengthintegerNoMinimum string length
maxLengthintegerNoMaximum string length
patternstringNoRegex the value must match
minimumnumberNoMinimum numeric value
maximumnumberNoMaximum numeric value
SelectOption Object
FieldTypeRequiredDefaultDescription
valuestringYesValue stored when the option is selected
labelstringYesLabel shown in the dropdown

Thumbnails

A thumbnail is the preview image shown for a widget in the No-Code Builder library. You have three ways to set one, controlled by two fields on the widget object:

  • Built-in — set imageName to one of the built-in identifiers.
  • External URL — set imageSrc to a publicly accessible image URL.
  • Repository-hosted — set imageSrc to a relative path to an image file in your repository.

imageName and imageSrc are mutually exclusive — if both are set, imageSrc wins. If neither is set, the default imageName: "banner" applies.

Custom thumbnails (external or repository-hosted) must be 512 KB or smaller. For best display, use 420×145 pixels — dimensions are not enforced.

Built-in (imageName)

Set imageName to one of the identifiers below. Each preview shows the thumbnail at a reduced size.

imageNamePreview
announcement_cardannouncement_card
autopilotautopilot
autopilot_theloopsautopilot_theloops
badgesbadges
bannerbanner
categoriescategories
community_statisticscommunity_statistics
container-2.1container-2.1
create_ideacreate_idea
customer_education_widgetcustomer_education_widget
dynamic_contentdynamic_content
events_calendarevents_calendar
featured_topicsfeatured_topics
groupsgroups
hero_bannerhero_banner
html_widgethtml_widget
ideation_pipelineideation_pipeline
introduction_barintroduction_bar
leaderboardleaderboard
most_likedmost_liked
quicklinksquicklinks
recommendationsrecommendations
solved_topicssolved_topics
statisticsstatistics
tabstabs
tag_cloudtag_cloud

Example: "imageName": "banner" uses the built-in banner thumbnail.

External URL (imageSrc)

Point to any publicly accessible HTTPS image:

json
"imageSrc": "https://example.com/images/my-widget-preview.png"

Repository-hosted (imageSrc)

Store the image in your repository and reference it with a relative path from the repo root:

json
"imageSrc": "./images/preview.png"

Both ./images/preview.png and images/preview.png are valid. During publishing, the platform fetches the image from your repository, publishes it, and rewrites the path to an absolute URL. The resulting registry always contains absolute URLs.

Path rules:

  • No path traversal (../ is not allowed)
  • No absolute paths (must not start with /)
  • The image must exist in the repository at the referenced path

Validation Rules

The schema enforces these rules:

  1. Root object must have a widgets property (required)
  2. widgets must be an array (may be empty)
  3. Each widget must include all required fields
  4. attributes on scripts and stylesheets must be an object with string values

Validation errors

For a full list of validation and build errors, including causes and fixes, see Error Codes.

Best Practices

  1. Use globally unique type values: The type is the widget ID and must be unique across your entire community. Use a prefix like your company or project name (e.g., acme_welcome_banner)
  2. Keep descriptions concise: Brief but descriptive
  3. Set widgetsLibrary: true to make widgets appear in the No-Code Builder library
  4. Use semantic versioning: Follow semver (major.minor.patch)
  5. Validate before pushing: Use a JSON validator to catch syntax errors

Next Steps

Gainsight CC Developer Portal