Join our Discord community
Device mocks

Safari

Authentic Safari browser mockup featuring macOS design elements and customizable URL display. A JavaScript component that works seamlessly in React and Next.js projects with full TypeScript support and shadcn/ui compatibility.

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/safari.json
npx shadcn@latest add https://www.shadcn.io/registry/safari.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/safari.json
bunx shadcn@latest add https://www.shadcn.io/registry/safari.json

Features

  • Free open source React component built for Next.js applications with zero licensing costs
  • High-fidelity Safari browser mockup with authentic macOS design using modern SVG
  • TypeScript-first development with comprehensive type definitions and IntelliSense support
  • Tailwind CSS integration for seamless styling and automatic dark mode theme switching
  • shadcn/ui compatibility following established design system patterns and conventions
  • Image and video content support with proper aspect ratio handling using JavaScript
  • Configurable URL display in the address bar for realistic browser presentations
  • Dual display modes - default with full browser controls and simple for minimal UI
  • Authentic browser elements including traffic light controls (red, yellow, green) for macOS feel
  • Complete navigation controls including back, forward, refresh, and tab management interfaces
  • Responsive design with customizable dimensions while maintaining browser aspect ratio
  • Performance optimized with clean SVG implementation for crisp rendering at any scale

Examples

Simple Browser Mockup

Loading component...

With Image Content

Loading component...

With Video Content

Loading component...

API Reference

Safari

PropTypeDefaultDescription
urlstringundefinedThe URL to display in the address bar
imageSrcstringundefinedImage source to display inside the browser
videoSrcstringundefinedVideo source to display inside the browser
widthnumber1203Width of the Safari component
heightnumber753Height of the Safari component
mode"default" | "simple""default"Display mode - default shows browser controls, simple shows minimal UI
classNamestringundefinedAdditional CSS classes to apply

The component also accepts all standard SVG props via SVGProps<SVGSVGElement>.

Use Cases

This free open source React component is perfect for:

  • Next.js portfolios - Showcase web applications with TypeScript integration and browser context
  • Website presentations - Display web projects in authentic Safari browser frames
  • shadcn/ui projects - Integrate professional browser mockups into your design system
  • Marketing websites - Present web applications with realistic Safari browser mockups using Tailwind CSS
  • Product demonstrations - Create compelling web app demos with video content and URL display
  • Client presentations - Impress clients with high-fidelity web application presentations using JavaScript
  • Design portfolios - Display web design work within authentic macOS browser environments
  • Documentation sites - Show web application features within realistic browser contexts

Technical Details

macOS-Authentic Design

This open source component replicates genuine Safari browser specifications:

  • Exact macOS styling matching Apple's Safari browser interface design
  • Traffic light implementation with precise positioning and authentic color schemes
  • Browser control accuracy including navigation buttons, address bar, and tab interfaces
  • URL bar functionality with customizable text display for realistic presentations
  • TypeScript type safety ensuring reliable component prop validation

Display Mode Options

  • Default mode - Full Safari interface with all browser controls and navigation elements
  • Simple mode - Minimal browser frame for content-focused presentations
  • Responsive scaling - Maintains authentic proportions across different screen sizes

Performance Optimizations

  • Optimized SVG architecture with minimal JavaScript overhead for fast rendering
  • Next.js compatibility with complete server-side rendering and static generation support
  • Efficient clip paths for seamless content integration without performance degradation
  • Tailwind CSS optimization for consistent theming and responsive browser design

Accessibility

This component includes comprehensive accessibility features:

  • Semantic SVG structure with proper ARIA labels for screen reader compatibility
  • React-compatible navigation when used in interactive Next.js applications
  • Keyboard-friendly design that supports standard browser interaction patterns
  • High contrast support with automatic dark mode adaptation using Tailwind CSS