This module provides a comprehensive attribute handling system for web components.
It includes utilities for checking attribute states, observing changes, and managing values.
Key Concepts:
Attribute Names: Centralized constants for all attribute names (see ./names.ts)
Attribute Values: Predefined values for attributes (see ./values.ts)
Check Functions: Utilities to check attribute states (see ./checks.ts)
Handlers: Reactive observers for attribute changes (see ./handler.ts)
Attribute System for UMD Web Components
This module provides a comprehensive attribute handling system for web components. It includes utilities for checking attribute states, observing changes, and managing values.
Key Concepts:
Usage Patterns:
Configuration Attributes (data-*)
Used for initial component configuration:
data-theme="dark"
- Sets visual themedata-display="list"
- Sets display modedata-visual-open="true"
- Sets initial stateObserved Attributes
Used to trigger component behavior:
is-visual-open
- Triggers open animationresize
- Triggers size recalculationstate-open
(deprecated) - Use data-visual-openAccessing Attribute Names
Attributes.names.visual.size
Attributes.names.theme.default
,Attributes.names.display.default
Attributes.names.deprecated.visual.VISUAL_SIZE