Skip to content

Open source CapCut alternative.

TypeScript

feat(site): frameless edge-to-edge onboarding demos on mobile

David Lef55b2eb2d41c
diff --git a/site/src/cut/components/editor-mock/EditorMock.tsx b/site/src/cut/components/editor-mock/EditorMock.tsx
index 0317af48..ca531f7e 100644
--- a/site/src/cut/components/editor-mock/EditorMock.tsx
+++ b/site/src/cut/components/editor-mock/EditorMock.tsx
@@ -111,16 +111,18 @@ export function EditorMock({
{frame === "card" && (
<div
aria-hidden
- className="absolute inset-0 translate-x-[6px] translate-y-[6px] rounded-2xl bg-ink"
+ className="absolute inset-0 translate-x-[6px] translate-y-[6px] rounded-2xl bg-ink max-md:hidden"
/>
)}
+ {/* On mobile every frame dissolves: mocks sit edge to edge there, so
+ corners, borders, and shadows have no surface to sit on. */}
<div
className={cn(
- "relative h-full w-full overflow-hidden rounded-2xl bg-card",
+ "relative h-full w-full overflow-hidden rounded-2xl bg-card max-md:rounded-none",
frame === "lifted" &&
- "shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_24px_64px_rgba(15,14,13,0.25)] max-md:rounded-none",
+ "shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_24px_64px_rgba(15,14,13,0.25)]",
frame === "flat" && "shadow-[0_0_0_1px_rgba(0,0,0,0.06)]",
- frame === "card" && "border-2 border-ink",
+ frame === "card" && "border-2 border-ink max-md:border-0",
)}
>
<div
diff --git a/site/src/cut/components/onboarding/slides/Welcome.tsx b/site/src/cut/components/onboarding/slides/Welcome.tsx
index d21332e9..f5d68b86 100644
--- a/site/src/cut/components/onboarding/slides/Welcome.tsx
+++ b/site/src/cut/components/onboarding/slides/Welcome.tsx
@@ -18,8 +18,9 @@ export function WelcomeSlide() {
</p>
</div>
{/* Contained rather than width-driven: on a short window the mock gives
- up size instead of pushing the slide into a scroll. */}
- <div className="h-[min(56vh,640px)] w-full max-w-[1060px]">
+ up size instead of pushing the slide into a scroll. On mobile it
+ cancels the slide's padding and runs edge to edge. */}
+ <div className="-mx-6 h-[min(56vh,640px)] w-[calc(100%+3rem)] max-w-[1060px] md:mx-0 md:w-full">
<EditorMock
project={ONBOARDING_PROJECT}
fit="contain"