Skip to main content
The no-html-elements rule disallows usage of standard HTML elements (<div>, <span>, <button>, etc.) in UI extensions.

Rule details

UI extensions only support components provided by the @hubspot/ui-extensions package. Standard HTML elements are not supported in the UI extensions runtime environment and will fail to render. This rule detects and reports usage of any standard HTML elements in your extension code. Note that other third-party React component libraries are also not supported in UI extensions, though they are not currently linted by this rule.

HTML element alternatives

Use the following UI extension components instead of standard HTML elements: For a complete list of available components, refer to the UI component documentation.

Examples

Container elements

Instead of using <div>, <p>, or <span>:
Use <Box>:

Text and heading elements

Instead of using <h1>, <p>, or other text elements:
Use <Heading> and <Text>:

Interactive elements

Instead of using <button>:
Use <Button>:

Media elements

Instead of using <img>:
Use <Image>:
Last modified on March 29, 2026