Skip to content
sneasPublic

About

Make any HTML/CSS content look like it is rendered on a mobile device. Perfect for showcasing mobile apps. Supports React, Angular, Vue, Vanilla.

Topics

Resources

Stars

32 stars

Watchers

1 watching

Forks

Latest commit

 

History

48 Commits

Folders and files

Repository files navigation

@sneas/telephone - Web Component

Telephone

version

Wrap any HTML/CSS/JS code with the

<iphone-16-max></iphone-16-max> or

<pixel-9-pro></pixel-9-pro> or

<ipad-air-13></ipad-air-13> or

<android-tablet></android-tablet>

and it will be rendered inside an SVG device frame.

Example

Demo: https://sneas.github.io/telephone

Real world example: https://vocably.pro

Installation

<script
  defer
  src="https://cdn.jsdelivr.net/npm/@sneas/telephone@1/iphone-16-max.js"
></script>
<script
  defer
  src="https://cdn.jsdelivr.net/npm/@sneas/telephone@1/pixel-9-pro.js"
></script>
<script
  defer
  src="https://cdn.jsdelivr.net/npm/@sneas/telephone@1/ipad-air-13.js"
></script>
<script
  defer
  src="https://cdn.jsdelivr.net/npm/@sneas/telephone@1/android-tablet.js"
></script>

<iphone-16-max mode="light">
  iPhone content goes here.
  Set the mode="light" for the dark text in the status bar.
</iphone-16-max>

<pixel-9-pro mode="dark">
  Pixel content goes here.
  Set mode="dark" for the white text in the status bar.
</pixel-9-pro>

<ipad-air-13 mode="light">
  iPad Air 13" content goes here.
</ipad-air-13>

<android-tablet mode="light">
  Android tablet content goes here.
</android-tablet>

About

Make any HTML/CSS content look like it is rendered on a mobile device. Perfect for showcasing mobile apps. Supports React, Angular, Vue, Vanilla.

Topics

Resources

Stars

32 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages