diff --git a/docs/catalog/components/kinetic-center-build.mdx b/docs/catalog/components/kinetic-center-build.mdx new file mode 100644 index 0000000000..402cb0ff70 --- /dev/null +++ b/docs/catalog/components/kinetic-center-build.mdx @@ -0,0 +1,649 @@ +--- +title: "Kinetic Center Build" +description: "Words enter from the right and push the growing phrase left until the final line locks centered." +--- + +import { InstallCommand } from "/snippets/install-command.jsx"; +import { VariablesExplorer } from "/snippets/variables-explorer.jsx"; + + + +```html kinetic-center-build.html + + + + + + Kinetic Center Build + + + + + +``` + + + +## Install + + + +That writes one file: `compositions/components/kinetic-center-build.html`. + +## Paste it into your composition + +Open `compositions/components/kinetic-center-build.html` and copy what is inside into your own composition. + +A component has no size or duration of its own. It takes both from the composition +you paste it into. + +## Variables + +Every one of these has a default, so the piece works untouched. Set the ones you +want to change on the element: + +| Variable | Default | Accepts | What it does | +| --- | --- | --- | --- | +| `text` | `Words push left.` | string | Short phrase that builds one word at a time. | +| `font_size` | `72` | 36px to 160px, step 2px | Maximum text size in pixels. Longer phrases shrink to stay inside the frame. | +| `entry_offset` | `88` | 20px to 160px, step 4px | Horizontal distance each new word travels before it lands. | +| `color` | `#171717` | color | Text color for the full phrase. | +| `font_weight` | `600` | `500`, `600`, `700`, `800` | Weight used by every word in the phrase. | + +Set them with `data-variable-values` on the element that mounts it. These are the +defaults, so this behaves exactly like the preview above until you change one: + +```html wrap +
+``` + +## Source + + + +```html + + + + + + Kinetic Center Build + + + + + +``` + + + +{/* hf:generated-footer */} + +Tagged `motion-primitive` `text-effects` `kinetic-type` `reveal` `remocn-port`. + +Created by [Remocn](https://github.com/Remocn/remocn). + +## Related topics + +- [Browse the complete Catalog](/catalog) +- [Add assets and Catalog items in Studio](/studio/assets-and-blocks) +- [Build a richer composition](/go-further) diff --git a/docs/docs.json b/docs/docs.json index 3fda075161..f21bd28da3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -286,6 +286,7 @@ "catalog/blocks/hw-path-text", "catalog/blocks/hw-title", "catalog/components/inline-highlight", + "catalog/components/kinetic-center-build", "catalog/components/kinetic-type-swap", "catalog/components/line-by-line-slide", "catalog/components/line-swap", diff --git a/docs/public/catalog-index.json b/docs/public/catalog-index.json index 24a956eeae..4050a8b42c 100644 --- a/docs/public/catalog-index.json +++ b/docs/public/catalog-index.json @@ -2260,6 +2260,21 @@ "href": "/catalog/components/keyframe-scrub-stack", "preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/keyframe-scrub-stack.png" }, + { + "name": "kinetic-center-build", + "type": "component", + "title": "Kinetic Center Build", + "description": "Words enter from the right and push the growing phrase left until the final line locks centered.", + "tags": [ + "motion-primitive", + "text-effects", + "kinetic-type", + "reveal", + "remocn-port" + ], + "href": "/catalog/components/kinetic-center-build", + "preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/kinetic-center-build.png" + }, { "name": "kinetic-type-swap", "type": "component", diff --git a/docs/public/catalog/components/kinetic-center-build.json b/docs/public/catalog/components/kinetic-center-build.json new file mode 100644 index 0000000000..300ab7e66f --- /dev/null +++ b/docs/public/catalog/components/kinetic-center-build.json @@ -0,0 +1 @@ +{"html":"\n\n\n \n \n \n Kinetic Center Build Demo\n \n \n \n \n \n \n \n \n\n \n \n \n\n"} \ No newline at end of file diff --git a/registry/components/kinetic-center-build/demo.html b/registry/components/kinetic-center-build/demo.html new file mode 100644 index 0000000000..9cd36d3d2d --- /dev/null +++ b/registry/components/kinetic-center-build/demo.html @@ -0,0 +1,86 @@ + + + + + + + Kinetic Center Build Demo + + + + +
+
+
+
+ + + + + diff --git a/registry/components/kinetic-center-build/kinetic-center-build.html b/registry/components/kinetic-center-build/kinetic-center-build.html new file mode 100644 index 0000000000..000eab1326 --- /dev/null +++ b/registry/components/kinetic-center-build/kinetic-center-build.html @@ -0,0 +1,286 @@ + + + + + + Kinetic Center Build + + + + + diff --git a/registry/components/kinetic-center-build/registry-item.json b/registry/components/kinetic-center-build/registry-item.json new file mode 100644 index 0000000000..89a04fc572 --- /dev/null +++ b/registry/components/kinetic-center-build/registry-item.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://hyperframes.heygen.com/schema/registry-item.json", + "name": "kinetic-center-build", + "type": "hyperframes:component", + "title": "Kinetic Center Build", + "description": "Words enter from the right and push the growing phrase left until the final line locks centered.", + "tags": ["motion-primitive", "text-effects", "kinetic-type", "reveal", "remocn-port"], + "jobs": ["reveal"], + "family": "text-effects", + "profile": "build", + "author": "Remocn", + "authorUrl": "https://github.com/Remocn/remocn", + "license": "MIT", + "syncPoints": [{ "id": "phrase-locked", "phase": "in", "offset": 1.2 }], + "files": [ + { + "path": "kinetic-center-build.html", + "target": "compositions/components/kinetic-center-build.html", + "type": "hyperframes:snippet" + } + ], + "variables": [ + { + "id": "text", + "type": "string", + "role": "content", + "label": "Text", + "description": "Short phrase that builds one word at a time.", + "default": "Words push left." + }, + { + "id": "font_size", + "type": "number", + "role": "style", + "label": "Font size", + "description": "Maximum text size in pixels. Longer phrases shrink to stay inside the frame.", + "default": 72, + "min": 36, + "max": 160, + "step": 2, + "unit": "px" + }, + { + "id": "entry_offset", + "type": "number", + "role": "motion", + "label": "Entry offset", + "description": "Horizontal distance each new word travels before it lands.", + "default": 88, + "min": 20, + "max": 160, + "step": 4, + "unit": "px" + }, + { + "id": "color", + "type": "color", + "role": "style", + "label": "Color", + "description": "Text color for the full phrase.", + "default": "#171717" + }, + { + "id": "font_weight", + "type": "enum", + "role": "style", + "label": "Font weight", + "description": "Weight used by every word in the phrase.", + "default": "600", + "options": [ + { "value": "500", "label": "Medium" }, + { "value": "600", "label": "Semibold" }, + { "value": "700", "label": "Bold" }, + { "value": "800", "label": "Extra bold" } + ] + } + ] +} diff --git a/registry/registry.json b/registry/registry.json index ae2fb69d61..73115b58f3 100644 --- a/registry/registry.json +++ b/registry/registry.json @@ -995,6 +995,10 @@ "name": "keyframe-scrub-stack", "type": "hyperframes:component" }, + { + "name": "kinetic-center-build", + "type": "hyperframes:component" + }, { "name": "kinetic-type-swap", "type": "hyperframes:component"