Join our Discord community
Device mocks

Android

Realistic Android device mockup component for showcasing mobile apps. Perfect for React and Next.js projects with TypeScript support, Tailwind styling, and seamless shadcn/ui integration.

Loading component...

Installation

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

Features

  • Free open source React component built for Next.js applications with zero licensing costs
  • Realistic Android device mockup with authentic proportions and modern design using SVG
  • TypeScript-first development with comprehensive type definitions and IntelliSense support
  • Tailwind CSS integration for seamless styling and dark mode theme adaptation
  • shadcn/ui compatibility following established design system patterns
  • Image and video display support with proper aspect ratio handling using modern JavaScript
  • Customizable dimensions while maintaining authentic device proportions
  • Hardware detail rendering including volume buttons, power button, and front camera elements
  • Automatic content clipping for content that fits perfectly within the screen area
  • Responsive design that scales appropriately across different screen sizes
  • Performance optimized with efficient SVG rendering and GPU acceleration

Examples

With Image Content

Loading component...

With Video Content

Loading component...

API Reference

Android

PropTypeDefaultDescription
widthnumber433Width of the device mockup in pixels
heightnumber882Height of the device mockup in pixels
srcstringundefinedImage source URL to display within the device screen
videoSrcstringundefinedVideo source URL to display within the device screen
classNamestringundefinedAdditional CSS classes to apply to the SVG element

Usage Notes

  • The component extends SVGProps<SVGSVGElement>, so all standard SVG properties are supported
  • When both src and videoSrc are provided, the video takes precedence
  • The device frame automatically adapts to light and dark themes
  • Content is automatically clipped to fit within the rounded screen area
  • Videos are set to autoplay, loop, and are muted by default for optimal user experience

Use Cases

This free open source React component is perfect for:

  • Next.js portfolios - Showcase mobile applications with TypeScript integration
  • App presentations - Display mobile app screenshots in realistic Android device frames
  • shadcn/ui projects - Integrate device mockups into your design system workflows
  • Marketing websites - Present mobile applications with professional device mockups using Tailwind CSS
  • Product demos - Create engaging product demonstrations with video content
  • Developer documentation - Show mobile app features within authentic device contexts
  • Client presentations - Impress clients with realistic mobile app presentations using JavaScript
  • Design portfolios - Display mobile design work in context of actual devices

Technical Details

SVG-Based Architecture

This open source component uses modern SVG technology:

  • Scalable vector graphics for crisp rendering at any size
  • CSS class integration with Tailwind CSS for consistent theming
  • Efficient DOM structure optimized for React rendering performance
  • TypeScript type safety ensuring reliable prop validation

Performance Optimizations

  • Lightweight SVG rendering with minimal JavaScript footprint
  • Next.js compatible with server-side rendering and static generation support
  • GPU-accelerated transforms using CSS properties for smooth animations
  • Optimized clip paths for efficient content masking without performance impact

Accessibility

This component includes accessibility features:

  • Semantic SVG structure with proper ARIA attributes for screen readers
  • React-compatible focus management when used in interactive Next.js applications
  • Responsive design that adapts to different viewport sizes and orientations
  • High contrast support with automatic dark mode adaptation using Tailwind CSS