@@ -271,17 +181,20 @@ function MobileHero() {
→
-
-
-
- {/* Title */}
-
- OpenUI
-
+
+
+
+
+
+ {/* Title */}
+
+ OpenUI
+
+
{/* Subtitle */}
-
+
The Open Standard
for Generative UI
@@ -310,11 +223,11 @@ function MobileHero() {
// ---------------------------------------------------------------------------
const PREVIEW_NATIVE_WIDTH = 1600;
-const PREVIEW_NATIVE_HEIGHT = 518;
const PREVIEW_SCALE_MULTIPLIER = 1.25;
function ScaledPreview() {
const containerRef = useRef(null);
+ const frameRef = useRef(null);
const [scale, setScale] = useState(1);
useEffect(() => {
@@ -327,16 +240,14 @@ function ScaledPreview() {
return () => observer.disconnect();
}, []);
+ useEffect(() => {
+ if (!frameRef.current) return;
+ frameRef.current.style.setProperty("--preview-scale", String(scale * PREVIEW_SCALE_MULTIPLIER));
+ }, [scale]);
+
return (
-
@@ -347,15 +258,7 @@ function PreviewImage() {
return (
-
diff --git a/docs/app/(home)/components/Navbar/Navbar.module.css b/docs/app/(home)/sections/Navbar/Navbar.module.css
similarity index 91%
rename from docs/app/(home)/components/Navbar/Navbar.module.css
rename to docs/app/(home)/sections/Navbar/Navbar.module.css
index ee02c7cc1..9978c3a58 100644
--- a/docs/app/(home)/components/Navbar/Navbar.module.css
+++ b/docs/app/(home)/sections/Navbar/Navbar.module.css
@@ -8,6 +8,10 @@
transition: border-color 0.2s ease;
}
+.navScrolled {
+ border-bottom: 1px solid var(--home-border-default);
+}
+
.navInner {
display: flex;
max-width: 75rem;
@@ -25,7 +29,7 @@
.logoDivider {
height: 1rem;
width: 1px;
- background: rgb(0 0 0 / 10%);
+ background: var(--home-border-default);
}
.desktopTabs,
@@ -62,7 +66,6 @@
.hamburgerIcon {
height: 1.25rem;
width: 1.25rem;
- color: #000;
}
.mobileMenuButton {
@@ -105,7 +108,7 @@
border-bottom-left-radius: 18px;
border-bottom-right-radius: 18px;
background: #fff;
- box-shadow: 0 10px 20px rgb(0 0 0 / 10%);
+ box-shadow: var(--home-shadow-panel);
}
.mobileTrayInner {
@@ -170,9 +173,9 @@
position: absolute;
inset: 0;
pointer-events: none;
- border: 1px solid rgb(0 0 0 / 10%);
- border-radius: 999px;
- box-shadow: var(--mobile-github-button-shadow, none);
+ border: 1px solid var(--home-border-default);
+ border-radius: var(--home-radius-pill);
+ box-shadow: var(--home-shadow-elevated);
transition: box-shadow 0.2s ease;
}
diff --git a/docs/app/(home)/components/Navbar/Navbar.tsx b/docs/app/(home)/sections/Navbar/Navbar.tsx
similarity index 88%
rename from docs/app/(home)/components/Navbar/Navbar.tsx
rename to docs/app/(home)/sections/Navbar/Navbar.tsx
index 5da6d286a..625658596 100644
--- a/docs/app/(home)/components/Navbar/Navbar.tsx
+++ b/docs/app/(home)/sections/Navbar/Navbar.tsx
@@ -9,8 +9,7 @@ import {
useGitHubStarCount,
} from "@/components/brand-logo";
import { AnimatePresence, motion } from "motion/react";
-import { useCallback, useEffect, useState, type CSSProperties } from "react";
-import { BUTTON_SHADOW } from "../shared/shared";
+import { useCallback, useEffect, useState } from "react";
import styles from "./Navbar.module.css";
// ---------------------------------------------------------------------------
@@ -25,10 +24,6 @@ const TAB_URLS: Record
= {
Components: "/docs/components",
Blog: "/blog",
};
-const NAVBAR_BORDER_COLOR = "rgba(0,0,0,0.1)";
-const MOBILE_GITHUB_BUTTON_STYLE = {
- "--mobile-github-button-shadow": BUTTON_SHADOW,
-} as CSSProperties;
// Sub-components
// ---------------------------------------------------------------------------
@@ -76,7 +71,7 @@ function HamburgerIcon({ isOpen }: { isOpen: boolean }) {
);
}
-function MobileMenu({ starCount, onClose }: { starCount: number; onClose: () => void }) {
+function MobileMenu({ starCount, onClose }: { starCount: number | null; onClose: () => void }) {
return (
<>
{/* Backdrop overlay — below navbar (absolute top-full), covers rest of viewport */}
@@ -122,11 +117,7 @@ function MobileMenu({ starCount, onClose }: { starCount: number; onClose: () =>
rel="noopener noreferrer"
className={styles.mobileGithubButton}
>
-
+
@@ -160,10 +151,7 @@ export function Navbar() {
}, []);
return (
-