Mockup
launchui/mockupFreeComponent
Device mockup frames for showcasing app screenshots.
Live preview
live · rendered by the registry
Rendered by launchui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.launchuicomponents.com/r/mockup.jsonSource
1import { cva, type VariantProps } from "class-variance-authority";2import React from "react";34import { cn } from "@/lib/utils";56const mockupVariants = cva(7 "flex relative z-10 overflow-hidden shadow-2xl border border-border/70 dark:border-border/5 dark:border-t-border/15",8 {9 variants: {10 type: {11 mobile: "rounded-[48px] max-w-[350px]",12 responsive: "rounded-md",13 },14 },15 defaultVariants: {16 type: "responsive",17 },18 },19);2021export interface MockupProps22 extends23 React.HTMLAttributes<HTMLDivElement>,24 VariantProps<typeof mockupVariants> {}2526function Mockup({ className, type, ...props }: MockupProps) {27 return (28 <div29 data-slot="mockup"30 className={cn(mockupVariants({ type, className }))}31 {...props}32 />33 );34}3536const frameVariants = cva(37 "bg-border/50 flex relative z-10 overflow-hidden rounded-2xl dark:bg-border/10",38 {39 variants: {40 size: {41 small: "p-2",42 large: "p-4",43 },44 },45 defaultVariants: {46 size: "small",47 },48 },49);5051export interface MockupFrameProps52 extends53 React.HTMLAttributes<HTMLDivElement>,54 VariantProps<typeof frameVariants> {}5556function MockupFrame({ className, size, ...props }: MockupFrameProps) {57 return (58 <div59 data-slot="mockup-frame"60 className={cn(frameVariants({ size, className }))}61 {...props}62 />63 );64}6566export { Mockup, MockupFrame };
What it pulls in
npm packages
Files it writes
More from launchui
All 24 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Badgebadge | launchui | Components | Free | 2 deps | |
| Buttonbutton | launchui | Components | Free | 2 deps | |
| Cardcard | launchui | Components | Free | 1 dep | |
| Glowglow | launchui | Components | Free | 1 dep | |
| Launch UI Baselaunchui | launchui | Components | Free | no deps · 10 files | |
| Pro Dependenciespro | launchui | Components | Free | 14 deps | |
| Screenshotscreenshot | launchui | Components | Free | 1 dep |
