mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-15 22:08:03 +00:00
60 lines
1.8 KiB
Plaintext
60 lines
1.8 KiB
Plaintext
---
|
||
title: "Code Morph"
|
||
description: "One snippet transforms into another — tokens glide between positions, leavers fade out, enterers fade in. Shiki Magic Move re-driven as a paused GSAP timeline."
|
||
---
|
||
|
||
One snippet transforms into another — tokens glide between positions, leavers fade out, enterers fade in. Shiki Magic Move re-driven as a paused GSAP timeline.
|
||
|
||
`code` `code-animation` `morph` `refactor` `developer`
|
||
|
||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/code-morph.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/code-morph.png" autoPlay muted loop playsInline />
|
||
|
||
## Add it to a project
|
||
|
||
Ask your agent:
|
||
|
||
```text
|
||
Add the Code Morph block from the HyperFrames Catalog to this project.
|
||
Replace the demo content with mine and match the existing design and timing.
|
||
```
|
||
|
||
Or install it from the project folder:
|
||
|
||
<CodeGroup>
|
||
|
||
```bash Terminal
|
||
npx hyperframes add code-morph
|
||
```
|
||
|
||
</CodeGroup>
|
||
|
||
<Accordion title="Technical details">
|
||
|
||
| Property | Value |
|
||
| --- | --- |
|
||
| Type | Block |
|
||
| Dimensions | 1920×1080 |
|
||
| Duration | 7s |
|
||
|
||
**Installed files**
|
||
|
||
| File | Target | Type |
|
||
| --- | --- | --- |
|
||
| `code-morph.html` | `compositions/code-morph.html` | hyperframes:composition |
|
||
|
||
</Accordion>
|
||
|
||
## Use it
|
||
|
||
Ask your agent to replace the example content, match the project style, and place the block at the right moment in the video.
|
||
|
||
<Accordion title="HTML for agents and developers">
|
||
|
||
The installed block can be added to a host composition with:
|
||
|
||
```html
|
||
<div data-composition-id="code-morph" data-composition-src="compositions/code-morph.html" data-start="0" data-duration="7" data-track-index="1" data-width="1920" data-height="1080"></div>
|
||
```
|
||
|
||
</Accordion>
|