Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
justify-content: center;
gap: 0.625rem;
height: 3rem;
padding-inline: 1.25rem;
padding-left: 1.25rem;
padding-right: 0.5rem;
border: 0;
border-radius: 999px;
background: #000;
Expand All @@ -94,6 +95,52 @@
box-shadow: none;
}

.ctaDesktopLabel {
display: none;
white-space: nowrap;
font-family: "Inter Display", sans-serif;
font-size: 18px;
font-weight: 500;
line-height: 1.5rem;
color: #fff;
}

.ctaMobileLabel {
position: relative;
display: block;
min-width: 0;
flex: 1;
overflow: hidden;
}

.ctaTicker {
display: flex;
width: max-content;
align-items: center;
animation: ctaTickerScroll 10s linear infinite;
}

.ctaTickerText {
white-space: nowrap;
padding-right: 2rem;
font-family: "Inter Display", sans-serif;
font-size: 18px;
font-weight: 500;
line-height: 1.5rem;
color: #fff;
}

.iconBadge {
display: flex;
height: 2rem;
width: 2rem;
flex-shrink: 0;
align-items: center;
justify-content: center;
border-radius: 999px;
background: rgb(255 255 255 / 15%);
}

.iconFrame {
position: relative;
display: flex;
Expand All @@ -120,14 +167,13 @@
transform: scale(0.5);
}

.ctaLabel {
position: relative;
white-space: nowrap;
font-family: "Inter Display", sans-serif;
font-size: 18px;
font-weight: 500;
line-height: 1.5rem;
color: #fff;
@keyframes ctaTickerScroll {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-50%);
}
}

.mediaColumn {
Expand All @@ -154,10 +200,9 @@

.copyColumn {
min-height: 0;
padding:16px;
padding: 16px;
}


.title {
max-width: 430px;
font-family: "Inter", sans-serif;
Expand All @@ -180,6 +225,14 @@
justify-content: flex-start;
}

.ctaDesktopLabel {
display: inline;
}

.ctaMobileLabel {
display: none;
}

.mediaColumn {
width: 600px;
}
Expand Down
62 changes: 32 additions & 30 deletions docs/app/(home)/components/BuildChatSection/BuildChatSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import styles from "./BuildChatSection.module.css";
// ---------------------------------------------------------------------------

const CARD_SHADOW = "0px 8px 16px -4px rgba(22,34,51,0.08)";
const COMMAND = "npx @openuidev/cli@latest create";

// ---------------------------------------------------------------------------
// Sub-components
Expand All @@ -36,7 +37,7 @@ function CtaButton() {
if (copied) return;

try {
await navigator.clipboard.writeText("npx @openuidev/cli@latest create");
await navigator.clipboard.writeText(COMMAND);
setCopied(true);
resetTimeoutRef.current = setTimeout(() => {
setCopied(false);
Expand All @@ -48,32 +49,37 @@ function CtaButton() {

return (
<div className={styles.ctaWrap}>
<button
onClick={handleClick}
className={styles.ctaButton}
>
<span className={styles.iconFrame}>
<span
className={`${styles.iconLayer} ${copied ? styles.iconHidden : styles.iconVisible}`}
>
<CopyIcon />
<button onClick={handleClick} className={styles.ctaButton}>
<span className={styles.ctaDesktopLabel}>{COMMAND}</span>
<span className={styles.ctaMobileLabel}>
<span className={styles.ctaTicker}>
<span className={styles.ctaTickerText}>{COMMAND}</span>
<span aria-hidden="true" className={styles.ctaTickerText}>
{COMMAND}
</span>
</span>
<svg
className={`${styles.iconLayer} ${copied ? styles.iconVisible : styles.iconHidden}`}
fill="none"
viewBox="0 0 14 14"
>
<path
d="M11.6667 3.5L5.25 9.91667L2.33334 7"
stroke="white"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
/>
</svg>
</span>
<span className={styles.ctaLabel}>
npx @openuidev/cli@latest create
<span className={styles.iconBadge}>
<span className={styles.iconFrame}>
<span
className={`${styles.iconLayer} ${copied ? styles.iconHidden : styles.iconVisible}`}
>
<CopyIcon color="white" />
</span>
<svg
className={`${styles.iconLayer} ${copied ? styles.iconVisible : styles.iconHidden}`}
fill="none"
viewBox="0 0 14 14"
>
<path
d="M11.6667 3.5L5.25 9.91667L2.33334 7"
stroke="white"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
/>
</svg>
</span>
</span>
</button>
</div>
Expand Down Expand Up @@ -101,11 +107,7 @@ export function BuildChatSection() {
<div className={styles.container}>
<div className={styles.card}>
{/* Border + shadow overlay */}
<div
aria-hidden="true"
className={styles.overlay}
style={{ boxShadow: CARD_SHADOW }}
/>
<div aria-hidden="true" className={styles.overlay} style={{ boxShadow: CARD_SHADOW }} />

<div className={styles.content}>
{/* Left: text content */}
Expand Down
Loading