BrowsePhone Duo

Mockups

Glass Phone Duo

A folding phone rendered in WebGL2, with your screens on the cover and inside.

Preview

ClosedOpen

Installation

Install the package once, then import the parts you use into a standalone component.

Install

npm install ngx-vitreo @angular/cdk @floating-ui/dom
Import

import { GlassPhoneDuo } from 'ngx-vitreo';

@Component({
  imports: [GlassPhoneDuo],
  // ...
})

Usage

Usage

<figure
  glassPhoneDuo
  screenSrc="/app-landscape.png"
  screenAlt="The app on the unfolded display"
  coverSrc="/app-portrait.png"
  coverAlt="The app on the cover display"
  finish="star-white"
  pose="laptop"
  [angle]="90"
></figure>

API reference

GlassPhoneDuo

figure[glassPhoneDuo]

InputTypeDefaultDescription
screenSrcstringNoneLandscape screenshot for the inner display, at a 2670:1878 ratio. Same origin or served with CORS. Required.
coverSrcstringNonePortrait screenshot for the outer display, at a 1398:2034 ratio. Same origin or served with CORS. Required.
screenAltstring'App on the unfolded phone display'Accessible label while the front of the open phone shows.
coverAltstring'App on the outer phone display'Accessible label while the closed phone shows, or the back of the open phone.
openbooleantrueOpens or closes the hinge. Ignored when angle is set.
anglenumberNoneHinge angle from 0 (closed) to 180 (flat), clamped. Overrides open; while it is set, view and pose changes apply at once.
finish'night-sky' | 'star-white''night-sky'Frame colour.
view'front' | 'back''front'Which side of the phone faces you.
pose'upright' | 'book' | 'tent' | 'laptop' | 'side''upright'Device orientation. Use angle to set the opening for book, tent or laptop.
glarebooleantrueReflections on the glass. Off under reduced transparency.