Skip to content
HELiX

Integration Architecture Decisions

apps/docs/src/content/docs/architecture/adrs Click to copy
Copied! apps/docs/src/content/docs/architecture/adrs

This section documents the four foundational architecture decisions that shape how HELiX components are composed, delivered, named, and rendered inside Drupal and other enterprise consumers. Each ADR captures the problem it solves, the alternatives considered, and the recommended pattern.

ADRTopicQuestion answered
Slots vs PropsCompositionDoes the component or Drupal control rendering?
Component LoadingDeliveryOne bundle, per-component files, or smart groups?
Attribute NamingHTML safetyWhich attribute names collide with the web platform?
Light DOMRenderingWhen should a component skip Shadow DOM?

The decisions are independent but composable. A single component embodies all four:

  • Composition determines who provides the inner markup (hx-card uses slots for every content region; hx-button uses properties for state/appearance and slots for label / prefix / suffix content).
  • Delivery determines how the component’s JavaScript reaches the page (attach_library('helix/hx-card')).
  • Attribute safety determines which HELiX-specific attributes are hx- prefixed to avoid Drupal Twig / CKEditor collisions, vs. which native HTML attributes (href, src, action, method, for) are preserved unprefixed.
  • Rendering determines whether the component creates a shadow boundary (hx-card does, hx-prose does not).

Read in order, the ADRs build a complete picture of how HELiX integrates with Drupal without giving up the accessibility and encapsulation guarantees of Shadow DOM.