Skill Tracer
Skills › HyperFrames › hyperframes-registry › wiring-components.md

wiring-components.md

39 lines · skills/hyperframes-registry/references/wiring-components.md at a595755

Open on GitHub
1# Wiring Components
2
3Components are effect snippets — HTML, CSS, and optionally JS that you merge directly into an existing composition. Unlike blocks, components have no standalone timeline; they participate in the host composition's timeline.
4

Wiring Components

Components are effect snippets — HTML, CSS, and optionally JS that you merge directly into an existing composition. Unlike blocks, components have no standalone timeline; they participate in the host composition's timeline.

Raw lines 1 to 4
5## General process
6
71. Run `hyperframes add <component-name>`
82. Open the installed file (e.g., `compositions/components/grain-overlay.html`)
93. Read the comment header for usage instructions
104. Copy the parts into your host composition:
11 - **HTML elements** — inside your `<div data-composition-id="...">`
12 - **CSS styles** — into your composition's `<style>` block
13 - **JS setup** — into your composition's `<script>`, before your timeline code
14 - **Timeline calls** — into your GSAP timeline (if the component exposes them)

General process

  1. Run hyperframes add <component-name>
  2. Open the installed file (e.g., compositions/components/grain-overlay.html)
  3. Read the comment header for usage instructions
  4. Copy the parts into your host composition:
  5. HTML elements — inside your <div data-composition-id="...">
  6. CSS styles — into your composition's <style> block
  7. JS setup — into your composition's <script>, before your timeline code
  8. Timeline calls — into your GSAP timeline (if the component exposes them)
Raw lines 5 to 15
16## Example: grain-overlay (CSS-only, no timeline integration)
18```html
19<!-- Paste the overlay div into your composition -->
20<div
21 id="grain-overlay"
22 style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100;"
24 <div class="grain-texture"></div>
25</div>
26```
28Then paste the CSS keyframes and `.grain-texture` rule into your styles. No GSAP timeline calls needed — the grain animates via CSS `@keyframes`.

Example: grain-overlay (CSS-only, no timeline integration)

<!-- Paste the overlay div into your composition -->
<div
  id="grain-overlay"
  style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100;"
>
  <div class="grain-texture"></div>
</div>

Then paste the CSS keyframes and .grain-texture rule into your styles. No GSAP timeline calls needed — the grain animates via CSS @keyframes.

Raw lines 16 to 29
30## Example: shimmer-sweep (needs timeline integration)
32See `examples/add-component.md` for the full shimmer-sweep walkthrough (HTML wrapping, CSS, JS setup, and timeline call).

Example: shimmer-sweep (needs timeline integration)

See examples/add-component.md for the full shimmer-sweep walkthrough (HTML wrapping, CSS, JS setup, and timeline call).

Raw lines 30 to 33
34## Key principles
36- Components inherit the host composition's dimensions and duration
37- Place component HTML at the appropriate z-index relative to your content
38- Read the comment header in each snippet for customizable values
39- Run `hyperframes lint` after wiring to catch structural issues

Key principles

  • Components inherit the host composition's dimensions and duration
  • Place component HTML at the appropriate z-index relative to your content
  • Read the comment header in each snippet for customizable values
  • Run hyperframes lint after wiring to catch structural issues
Raw lines 34 to 39