Skip to main content

Models

Overview

The /models export of the @hv/cms package contains zod schemas and type aliases representing normalized CMS objects.

Blocks

The ContentBlockType is a union of all possible inline content types. A Block could be something like a media hero, rich text, a carousel with product tiles, etc.

See the adding a CMS content type guide for a step by step walkthrough of adding new content block types.

Block Types

IDNameDescription
accordionAccordionBlockCollapsible structure used to organize and hide or reveal content.
articleArticleBlockIncludes text blocks and table of contents with slots for other content blocks.
articleCardArticleCardBlockCard representation of article.
carouselCarouselBlockCarousel as with array of content blocks as slides.
gridGridBlockGrid with content block children as grid items.
mediaBlockHeroMediaBlockHeroBlockImage based media section containing text block overlays. Differnet variants available for layout and positioning.
mediaBlockHeroVimeoMediaBlockHeroVimeoBlockMedia Block Hero with Vimeo video as the primary media.
mediaBlockHeroYouTubeMediaBlockHeroYouTubeBlockMedia Block Hero with YouTube video as the primary media.
mediaCardMediaCardBlockCard with rich text and image.
mediaCardVimeoMediaCardVimeoBlockCard with rich text and Vimeo video.
mediaCardYouTubeMediaCardYouTubeBlockCard with rich text and YouTube video.
mediaHeroMediaHeroBlockFull width Hero block with image and rich text overlay.
mediaHeroVimeoMediaHeroVimeoBlockFull width Hero Block containing Vimeo video.
mediaHeroYouTubeMediaHeroYouTubeBlockFull width Hero Block containing YouTube video.
menuBarMenuBarBlockNavigation component that contains an array of links and a CTA. The links are displayed in a dropdown in mobile.
personalizedContentBlockPersonalizedContentBlockBlock accepting child content blocks for different customer segments.
productTileProductTileBlockShopable Product Tile.
promoCarouselPromoCarouselBlockCarousel component that uses promo text components as its slides.
promoTextPromoTextBlockText block with positioning used in the Promo Carousel component.
simpleProductTileSimpleProductTileBlockReduced layout product tile.
textTextBlockRich text block, markdown or html.
vendorRenderedVendorRenderedBlockVendor Rendered Block - for CMSs that render their own content, such as Builder.io.

Pages

The Page type us a union of possible CMS page types. These are pieces of content that live at a url. All page types define page metadata fields. There are different page content types so that standalone pages can have varying templates.

Page Content Types

IDNameDescription
simpleSimplePageContentComposed of only an array of content blocks.
articleArticlePageContentArticle page has article specific fields like "read time" along with a content block headers and body content.

Navigation and related types represent a site navigation tree.

Footer and related types represent a site navigation tree that sits on the bottom of the site pages.

Theme

Theme and related types used to change the look and feel of the site.