atomico-hooks-dom
OfficialControl slotted and light DOM in Atomico
System Documentation
What problem does it solve?
Many Atomico web components need reliable ways to observe and interact with slotted content, light DOM children, and parent components while operating from inside a shadow DOM; manual DOM bookkeeping and inconsistent slot management make these tasks error-prone and fragile. This Skill centralizes reactive DOM observation and traversal into expressive hooks so components can respond to slot changes, track host children, render into the light DOM, and locate ancestor elements safely.
Core Features & Use Cases
- useSlot: Reactively observe assigned nodes of a slot and filter by type for typed, slotted content handling (e.g., dynamic card lists).
- useNodes: Observe light DOM children via MutationObserver for manual slot assignment workflows or when working with fragment markers and text nodes.
- useRender: Render virtual DOM into the light DOM from a shadow-rooted component to improve SEO, enable external styling, or place native form controls.
- useParent: Traverse composed or non-composed ancestor chains to locate parent components or elements for cross-component communication.
- Use Case: Build a card list that types and filters slotted items, renders a mirrored summary into the light DOM for SEO, and finds a containing form element across shadow boundaries to attach listeners.
Quick Start
Use the atomico-hooks-dom hooks to observe slot changes with useSlot, track host children with useNodes, render content into the light DOM with useRender, and locate ancestor components with useParent.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: atomico-hooks-dom Download link: https://github.com/atomicojs/atomico/archive/main.zip#atomico-hooks-dom Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.