Skip to main content

Product Details

The High Velocity front-end app displays product details in an accordion. The hv-ui product details package provides the components that make up the UI; they are built using Radix's Accordion component.

There are five components available:

  • Accordion: wrapper that contains the parts of the accordion and controls state
  • AccordionItem: wrapper that contains the parts of a collapsible section
  • AccordionTrigger: toggles the collapsed state of its associated item
  • AccordionContent: the collapsible content for an item
  • DetailsList: an unordered list that renders and array of items (currently unused)

Example

...content

Accordion

The Accordion component has a default value of ['details'] and is given a type of multiple, which allows more than one accordion to be open at the same time.

PropertyDescriptionType
classNameAdditional classes for styling the elementString
childrenAccordion child componentsReactNode
propsRadix accordion propertiesAccordionPrimitive.Accordion

Accordion Item

PropertyDescriptionType
idA unique value for the itemString
childrenAccordion Item child componentsReactNode

Accordion Trigger

The AccordionTrigger contains a Heading component that will render an <h2> heading element. Its styles can not be overridden; customizations can be made directly to the component source file.

PropertyDescriptionType
childrenAccordion Trigger headingReactNode

Accordion Content

PropertyDescriptionType
childrenContent to displayReactNode

Details List

The DetailsList component will take an array of children and render them in an unordered list. This component is not currently used in the High Velocity front-end app.

PropertyDescriptionType
childrenList items to displayReactNode[]