Custom card components (BETA)
Sales Hub
- Enterprise
Service Hub
- Enterprise
Below, learn about the components that you can include in custom cards to extend the CRM record UI.
You can also use the UI extensions playground in your HubSpot account to preview components and copy their code into your project.
To access the UI Extensions Playground, navigate to CRM Development in the main navigation bar, then click UI Extensions Playground in the left side sidebar menu.

To view example projects that contain fully built custom cards, check out HubSpot's example extension library on GitHub.
Components should be included in the sections
array of your serverless function. Standard components can be used by extensions in all locations, while other components can only be used by extensions in the middle pane.
Standard components include:
- Alert
- Button
- Button row
- Divider
- Description list
- Form
- Heading
- Image
- Input
- Select input
- Stack
- Statistics
- Tag
- Text
- Text area
- Toggle group
- Tile
In addition, extensions in the middle pane can use the following components:
Below, learn about each type of component and how to include it in an extension.
Renders a single alert.
type string (required)
The component type. For alerts, use |
title string (required)
The bolded title text of the alert. |
body string or object (required)
The explanatory text that appears below the |
variant string
The color of the alert. The following variants are available:
|
Renders a single button. Learn more about success and error handling and view examples in HubSpot's extension example library on GitHub.
type string (required)
The component type. For buttons, use |
text string (required)
The button's display text. |
href string
Navigates to a URL on button click. When a button includes both |
tooltip string
The text displayed in a tooltip on hover. |
onClick action
The button's action type. |
disabled boolean
Set to |
variant string
The type of button to display. The following variants are available:
|
Renders a row of button components. Learn more about success and error handling and view examples in HubSpot's extension example library on GitHub.
type string (required)
The component type. For button rows, use |
buttons array (required)
An array containing button component objects. The same properties are available for buttons when included in a button row. |
Renders a divider for spacing out components.
type string (required)
The component type. For dividers, use |
distance string
The space between the divider and the content above and below it. Can be set to any of the following:
|
Renders pairs of labels and values.
type string (required)
The component type. For description lists, use |
items array (required)An array that contains an object for each label and value pair. To display plain text, set body to a string value. To use markdown syntax, set body to a text component object. |
direction stringThe direction that the label and value pairs are displayed. By default, the value is set to column. You can also set the direction to row . |
Renders a form that can contain other components, such as input and button fields. Using events, you can then trigger serverless functions based on button click.
To see an example of a simple form, check out HubSpot's extension example library on GitHub.
type string (required)
The component type. For forms, use |
content array (required)
An array containing other components that represent the data to display in the form. For example: |
⮑ input
An input component that renders a fillable form field with a default value. |
⮑ button
A button component that renders a form submit button. On click, the button will execute the |
Renders large heading text, supporting plain text and markdown.
type string (required)
The component type. For headings, use |
text string (required)
Text to be displayed. Supports markdown when an additional property of |
Renders an image.
type string (required)
The component type. For images, use |
src string (required)
The URL of the image. |
alt string (required)
The image's alt text. |
width number
Sets a max-width for the image. When resizing, HubSpot will automatically adjust the height to respect the image's original aspect ratio. Images cannot exceed the width of the extension's container at various screen sizes, and values beyond that maximum width will not be applied to the image. |
onClick object
A card action object that triggers an action on element click. |
Renders a text input field where a user can enter a custom text value. Can only be used within a form component. You can retrieve the end user's submitted value with payload.formState.fieldName
. For example, to retrieve the value submitted for an input with a name
of example_select_input
, use payload.formState.example_select_input
. Learn more about the form submit action.
type string (required)
The component type. For inputs, use |
name string (required)
The input's unique identifier, similar to the HTML input element |
label string
The text that displays above the input. Required if |
tooltip string
The text that displays in a tooltip next to the label. |
inputType string
The type of form input to display. Supports the following values:
|
initialValue string
The value that the field is initially set to on load. |
pattern string (required)
Defines a regex pattern for validation. |
description string
Displayed text that describes the field's purpose. |
placeholder string
Text that appears in the input when no value is set. |
validationErrorMessage string
The error message to display when the regex pattern defined in |
readonly boolean
Sets the field as read-only on the CRM record. Users will not be able to fill the input field when set to |
required boolean
Sets the input as required for the form to be submittable. |
requiredValidationMessage string
The error message to display when the user hasn't entered a value in a required field. |
Renders a progress bar that shows a numeric and/or percentage-based representation of progress. HubSpot calculates the percent based on the maximum possible value specified in the component.
type string (required)
The component type. For progress bars, use |
title string
The text that displays above the progress bar. |
showPercentage boolean
Whether the progress bar displays the completion percentage. |
value number
The number representing the progress so far. Defaults to |
valueMax number
The maximum value of the progress bar. Defaults to |
valueDescription string
The text that explains the current state of the |
variant string
The color that indicates the type of progress bar. Can be one of the following:
|
Renders a dropdown select input field where a user can select a single value. When there are more than seven selectable options in the input, the component will automatically include a search field. Can only be used within a form component.
You can retrieve the end user's submitted value with payload.formState.fieldName
. For example, to retrieve the value submitted in a select input with a name
of example_select_input
, use payload.formState.example_select_input
. Learn more about the form submit action.
type string (required)
The component type. For inputs, use |
name string (required)
The input's unique identifier, similar to the HTML input element |
label string (required)
The text that displays above the input. |
placeholder string
Text that appears in the input when no value is selected. |
description string
Displayed text that describes the field's purpose. |
tooltip string
The text that displays in a tooltip next to the label. |
initialValue string, boolean, number
The value that the field is initially set to on load. Enables you to pre-fill the field. |
validationErrorMessage string
The error message that displays if a value is provided for |
options array (required)
An array of options available in the dropdown select. Each option is an object containing:
When you include more than seven options in this array, a search field will automatically be added to the component. |
readonly boolean
Sets the field as read-only on the CRM record. Users will not be able to fill the input field when set to |
required boolean
Sets the input as required for the form to be submittable. |
requiredValidationMessage string
The error message to display when the user hasn't entered a value in a required field. |
Renders a vertical stack of other components with adjustable spacing.
type string (required)
The component type. For stacks, use |
content array (required)
The components to render in the stack. |
distance string
The amount of vertical space between each component in the |
Renders data summaries.
type string (required)
The component type. For statistics, use |
items array (required)
An array of
Learn more about each property below. |
⮑ label string (required)
The statistic's text label. |
⮑ number string (required)
The number that displays under the label. |
⮑ description string or object
Displays helper information under the statistic.
|
Renders a tag.
type string (required)
The component type. For tags, use |
text string (required)
The tag's label. |
variant string
The tag's color. The following variants are available: |
onClick object
A card action object that triggers an action on element click. |
Renders text, supporting either plain text or markdown.
type string (required)
The component type. For text, use |
format stringOptionally, you can include format with a value of markdown to render the text with markdown syntax. Learn more about supported syntax below. |
text string (required)The text to display. If
|
variant stringThe style of text to display. Can be either of the following values for either
|
In a form, renders a multi-line plain text field. You can retrieve the end user's submitted value with payload.formState.fieldName
. For example, to retrieve the value submitted to a field with the name
of textarea_field
, use payload.formState.textarea_field
. Learn more about the form submit action.
Can only be used within a form component.
type string (required)
The component type. For text areas, use |
name string (required)
The text area's unique identifier, similar to the HTML <textarea> element's name attribute. |
label string (required)
The text that displays above the field. |
tooltip string
The text that displays in a tooltip next to the label. |
initialValue string
The value that the field is initially set to on load. |
description string
Displayed text that describes the field's purpose. |
placeholder string
Text that appears in the field when no value is set. |
readonly boolean
Sets the field as read-only on the CRM record. Users will not be able to fill the input field when set to |
required boolean
Sets the field as required for the form to be submittable. |
requiredValidationMessage string
The error message to display when the user hasn't entered a value in a required field. |
cols number
The visible width of the field in average character widths. |
rows number
The number of visible text lines in the field. |
maxLength number
The maximum number of characters (UTF-16 code units) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters. |
resize vertical, horizontal, both, none
Sets whether an element is resizable, and if so, in which directions. Possible values include:
|
In a form, renders a group of checkboxes or radio button subcomponents. You can retrieve the end user's submitted value with payload.formState.fieldName
. For example, to retrieve the value submitted for a checkbox with a name
of checkbox1
, use payload.formState.checkbox1
. Learn more about the form submit action.
Can only be used within a form component.
type string (required)
The component type. For toggle groups, use |
name string (required)
The toggle group's unique identifier. |
label string (required)
The text that displays above the toggle group. |
toggleType checkboxList, radioButtonList (required)
The type of toggle group to render (checkboxes or radio buttons). |
tooltip string
The text that displays in a tooltip next to the group. |
required boolean
When set to |
requiredValidationMessage string
The error message to display when the user hasn't entered a value in a required field. |
inline boolean
When set to |
variant default, small
The size of the checkboxes or radio buttons to display. Defaults to |
options array
The list of checkboxes or radio buttons to display. The array will contain the following properties: |
⮑ label string (required)
The checkbox or radio button text label. |
⮑ value string (required)
The checkbox or radio button's value. |
⮑ initialIsChecked boolean
Whether the checkbox or radio button is selected by default. If this is set to |
⮑ readonly boolean
When set to |
⮑ description string
Displayed text that describes the checkbox or radio button's purpose. |
Renders a square tile containing other components.
type string (required)
The component type. For tiles, use |
body array (required)
An array containing other CRM card component objects. |
Built on top of the description list component, this component enables you to display a read-only list of property values from a specified CRM record. This component enables you to access property data from specific records without needing to configure propertiesToSend.
Available for cards in the middle pane only.
type string (required)
The component type. For this component, use |
objectTypeId string (required)
The type of object you're pulling data from (i.e., When referencing a custom object, use the format |
objectId string (required)
The ID of the specified CRM record to display properties from. |
properties array (required)
The internal names of the properties to display. |
direction string
The direction that the properties will display in. By default, |
Displays a table of CRM data for a specified object, including custom objects. Specified properties will display as columns, with records filling out rows. This component enables you to access property data from records without needing to configure propertiesToSend.
Available for extensions in the middle pane only.
type string (required)
The component type. For this component, use |
objectTypeId string (required)
The type of object you're pulling data from (i.e., When referencing a custom object, use the format |
properties array (required)
Contains the properties to display as table columns. |
pageSize string
Maximum number of rows to shower per page. Defaults to 10. |
Thank you for your feedback, it means a lot to us.