Skip to content

Phone

A phone frame for a screen: the address bar and what the phone shows.

import { Phone } from '@sypnia/ui/react'

On this page
  1. A cart on a phone
  2. When to use it
  3. For everyone
  4. Props

A cart on a phone

Your cart
Coffee, 500 g$12.00
Mug$9.50
The payment failed
Code
import { Button, Phone, Status } from '@sypnia/ui/react';

export default function Screen() {
  return (
    <div className="sy-row" style={{ '--gap': 'var(--s-6)', alignItems: 'flex-start' } as React.CSSProperties}>
      <Phone url="shop.example.com/cart" width="16rem" label="The cart on a phone">
        <div className="sy-stack" style={{ '--gap': 'var(--s-3)' } as React.CSSProperties}>
          <strong>Your cart</strong>
          <div className="sy-row sy-row--between"><span>Coffee, 500 g</span><span className="sy-num">$12.00</span></div>
          <div className="sy-row sy-row--between"><span>Mug</span><span className="sy-num">$9.50</span></div>
          <Status tone="fail">The payment failed</Status>
          <Button variant="primary" block>Pay $21.50</Button>
        </div>
      </Phone>
    </div>
  );
}

When to use it

Use it when

  • Showing what happens on a phone on a public page.

Do not use it when

  • Inside the app.

For everyone

  • It is a figure with a name; its content is real and readable.

Props

PhoneTypeDefault
label string
url string
width string
  1. A cart on a phone
  2. When to use it
  3. For everyone
  4. Props

    Search pages, sections and terms