diff --git a/docs/design-system.md b/docs/design-system.md new file mode 100644 index 000000000..af4c1f9dd --- /dev/null +++ b/docs/design-system.md @@ -0,0 +1,29 @@ +# Design System & Reusable Components + +Hyperframes supports a global design system via `theme.json` and reusable HTML components. + +## 1. Global Theme (`templates/theme.json`) + +Define your brand's colors, typography, and spacing once: + +```json +{ + "colors": { "accent": "#FF5733" }, + "typography": { "heading": { "fontSize": "72px" } } +} +``` + +All CSS variables are auto-injected at render time with the prefix `--hf-*`: +- `--hf-color-accent` +- `--hf-font-family` +- `--hf-heading-size` +- `--hf-spacing-margin` + +## 2. Reusable Components (`templates/components/`) + +Pre-built components live in `templates/components/`. Copy any into your composition: + +- `LowerThird.html` — name + title overlay +- `Outro.html` — branded end card + +## 3. Style Inheritance Order \ No newline at end of file diff --git a/templates/components/LowerThird.html b/templates/components/LowerThird.html new file mode 100644 index 000000000..22f9c5e37 --- /dev/null +++ b/templates/components/LowerThird.html @@ -0,0 +1,44 @@ + +
+ Your Name + + Your Title +
diff --git a/templates/components/Outro.html b/templates/components/Outro.html new file mode 100644 index 000000000..4027a4158 --- /dev/null +++ b/templates/components/Outro.html @@ -0,0 +1,30 @@ + +
+

+ Thanks for watching. +

+
diff --git a/templates/theme.json b/templates/theme.json new file mode 100644 index 000000000..d51ee95ec --- /dev/null +++ b/templates/theme.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://hyperframes.heygen.com/schemas/theme.json", + "name": "default", + "version": "1.0.0", + "colors": { + "background": "#0F0F0F", + "primary": "#FFFFFF", + "accent": "#FF5733", + "muted": "#888888" + }, + "typography": { + "fontFamily": "Inter, sans-serif", + "heading": { + "fontSize": "72px", + "fontWeight": "700", + "lineHeight": "1.1" + }, + "body": { + "fontSize": "32px", + "fontWeight": "400", + "lineHeight": "1.5" + }, + "caption": { + "fontSize": "24px", + "fontWeight": "400" + } + }, + "spacing": { + "margin": "48px", + "gap": "24px", + "padding": "32px" + }, + "composition": { + "width": 1920, + "height": 1080 + } +}