HTML IDs

Centralized HTML ID constants for interaction pattern components

InteractionHtmlIds Class

This class provides centralized HTML ID constants for interaction pattern components. It extends AppHtmlIds from cjm-fasthtml-app-core to inherit base application IDs.


InteractionHtmlIds


def InteractionHtmlIds(
    args:VAR_POSITIONAL, kwargs:VAR_KEYWORD
):

HTML ID constants for interaction pattern components.

Inherits from AppHtmlIds: - MAIN_CONTENT = “main-content” - as_selector(id_str) - static method

Usage Examples

# Access base IDs
container_id = InteractionHtmlIds.STEP_FLOW_CONTAINER
print(f"Container ID: {container_id}")
print(f"Container selector: {InteractionHtmlIds.as_selector(container_id)}")
Container ID: step-flow-container
Container selector: #step-flow-container
# Generate step-specific IDs
step_id = "select-plugin"
content_id = InteractionHtmlIds.step_content(step_id)
indicator_id = InteractionHtmlIds.step_indicator(step_id)

print(f"Step content ID: {content_id}")
print(f"Step indicator ID: {indicator_id}")
print(f"Step content selector: {InteractionHtmlIds.as_selector(content_id)}")