Luca Perullo
Components

Component

LiveNew

Safari Mock

Aspect ratio 1203:753 default. Slot per imageSrc, videoSrc o children custom. Token bg-bg-alt + border-border.

MockDeviceShowcase
Open in ClaudeSorgente

Esempio01

safari-mock.tsx
001Default · placeholder content
lucaperullo.it
Anteprima del sito
002Custom URL · marketing site
components.lucaperullo.it/animated-beam
Animated Beam · 001

HTTP round-trip

003Compact · narrow embed
claude.ai/new
New chat

Note Top bar 36px h-9. URL pill mono 11px text-fg-muted, max-width 60% del bar. videoSrc autoplay muted loop playsInline.

Prompt LLM02

Incolla in Claude o ChatGPT per generare la tua variante. Include il contesto del brand, i token e i vincoli del progetto.

Prompt · safari-mock
Open in Claude
Sei un senior frontend engineer. Stai lavorando su un sito Next.js 16 + React 19 + Tailwind v4 in italiano, look chanhdai-inspired: colonna stretta 672px, Geist Sans + Geist Mono, hairline 1px, divisori a stripe diagonale, palette zinc.

Token CSS disponibili: --bg, --bg-alt, --fg, --fg-muted, --fg-soft, --border, --border-strong, --accent. Usa SEMPRE queste variabili tramite le utility tailwind generate (bg-bg, text-fg-muted, border-border, ecc.). Helper "cn" da "@/lib/utils". Niente librerie UI extra: solo lucide-react e tailwind-merge.

Genera un componente <SafariMock> div-based.
Props:
- url?: string.
- imageSrc?, videoSrc?, children?: ReactNode.
- width?: number (default 1203), height?: number (default 753).
- className?.

Implementazione:
- Server component. Wrapper relative overflow-hidden rounded-lg border border-border bg-bg-alt aspect-ratio width/height.
- Top bar h-9 border-b border-border bg-bg-alt: 3 traffic-light dots (red-500, amber-400, emerald-500), URL pill h-6 max-w-[60%] mx-auto rounded-md bg-bg font-mono 11px text-fg-muted.
- Content area absolute inset-0 top-9: video autoplay muted loop playsInline | img | children.

Output: file completo src/components/safari-mock.tsx.

Uso tipico03

tsx
<SafariMock url="esempio.com" imageSrc="/preview.png" />

Dipendenze04

npm
  • tailwind-merge
  • clsx
Interno
  • @/lib/utils#cn

Ti è servito? Dimmelo, oppure proponi il prossimo componente.