Skip to documentation content

Developer Reference

Register components and design tokens

Build theme-owned components from normalized context and map validated design tokens without shipping a plugin default skin.

Hotel Booking supplies component names, primitive data keys, context envelopes, availability semantics, renderer signatures and lifecycle. The theme owns HTML structure, template parts, component composition, responsive behavior, assets and art direction. There is no shared plugin skin or default markup.

Components

Register a callable with hotel_booking_register_component_renderer() and return a string for the documented component and surface. Use the read-only context from hotel_booking_component_context(). Unknown, unavailable, content-empty, unregistered or throwing renderers return an empty string. An optional Pro component therefore collapses cleanly when the capability is not available.

Design tokens

Register one complete atomic set with hotel_booking_register_design_tokens(). Categories include color, spacing, typography, container, border, radius and interaction. Values are safe strings or finite numbers; CSS block delimiters, URLs, comments and executable values are rejected. Map the validated values to theme-owned CSS variables such as --hb-theme-color-primary. Hotel Booking does not choose the palette, type scale or motion language, and tokens never own booking or license decisions.

Next: use feature and Language Navigation contracts.

Was this article helpful?

Your feedback helps us improve the documentation.