Guide / Controls / Layout

Flip card

Two sides: tap to flip

When to use it. A card with N faces that flips between them. Each face is a group (label, grid, nested children). Two faces give the classic front/back; more faces flip through in sequence and wrap. The active face index is the control value, so it syncs and fires

Type
flipCard
Also titled
Flip Card
Default size
2 rows × 2 columns
Symbol
rectangle.portrait.rotate
Docs
Docs complete
Search for it as
  • flip
  • card
  • reveal
  • two-sided
  • front back
  • flashcard
Flip card: Status front / actions back
Rendered by the app

Fields

5 fields you can set on a flipCard control. Every control also takes the shared fields (id, position, span, sync, action).

Fields
FieldTypeDefaultWhat it does
Flip byflipTriggerchoiceone of 2tap

What makes it flip

Chooses whether a tap or a long press turns the card to its next face.

  • tap defaulta quick tap flips the card
  • longPresspress and hold to flip, so taps reach controls on the face
Flip directionflipAxischoiceone of 2horizontal

Which way it turns

Turns the card left-to-right around a vertical axis or top-to-bottom around a horizontal one.

  • horizontal defaultspins left to right like a page of a book
  • verticaltips top to bottom like a notepad
panelspanelsobject—

The faces of the card

Lists the faces the card flips through, each a group with its own controls.

containerAnimationcontainerAnimationobject—

How the card animates when flipping

Tunes the flip motion, such as speed, bounce and 3D depth.

defaultValuedefaultValuenumberstep 10

Which face shows first

Picks the face shown at start, counting from 0.

Theme fields

Restyle one control by setting these in its theme object; a layout's theme sets them for every control.

Theme fields
FieldTypeDefaultWhat it does
surfacePrimarytheme.surfacePrimarycolor#FFFFFF0F

Face background

Fills each face card with this color.

cornerRadiustheme.cornerRadiusnumber0–30 ptstep 112

How rounded the faces are

Rounds each face corner from square (0) to 30 points.

Frosted glasstheme.blurEnabledon / offtrue (on)

Outline thickness

Sets how thick the face outline is, 0 to 5 points.

Card spacingtheme.cardPaddingnumber0–32 ptstep 112

Main text color

Colors the main text on the faces.

Emits and receives

What this control sends when you use it, and what it can show or follow when data arrives.

Emits

Emits
SendsWhenTypeWhat it sends
When you flip itvaluetapnumber

the number of the face now showing, counting from 0

Faces flip in order and wrap round to the first

Example: 1

Receives

Receives
TakesFromTypeWhat it does
valuefollowhub, mqtt, http, store, defaultnumber

the number of the face to show, counting from 0

the card flips to that face, turning once for each face it passes

Example: 1

Sample

The placeholder value the editor shows before real data arrives.

  • 0 then 1

Examples

3 examples, each one a control you can paste into a layout.

Status front / actions back

A gauge on the front and two buttons on the back, flipping left to right with a snappy spring.

JSON 17 lines
{
  "type": "flipCard",
  "id": "status-card",
  "position": [0, 0],
  "span": [2, 2],
  "flipAxis": "horizontal",
  "containerAnimation": { "profile": "snappy", "flipPerspective": 0.7 },
  "panels": [
    { "type": "group", "id": "front", "label": "Status", "position": [0,0], "grid": { "columns": 1, "rows": 1 },
      "children": [ { "type": "gauge", "id": "f-cpu", "position": [0,0], "label": "CPU", "min": 0, "max": 100, "defaultValue": 42 } ] },
    { "type": "group", "id": "back", "label": "Actions", "position": [0,0], "grid": { "columns": 2, "rows": 1 },
      "children": [
        { "type": "button", "id": "b-restart", "position": [0,0], "label": "Restart", "icon": "arrow.clockwise" },
        { "type": "button", "id": "b-stop", "position": [0,1], "label": "Stop", "icon": "stop.fill" }
      ] }
  ]
}

Open in CAR-TER

Flip card: Status front / actions back
Rendered by the app

Flashcard with a long press

A two-face quiz card that starts on the question and only flips when you press and hold.

JSON 14 lines
{
  "type": "flipCard",
  "id": "quiz-card",
  "position": [0, 0],
  "span": [2, 2],
  "flipTrigger": "longPress",
  "defaultValue": 0,
  "panels": [
    { "type": "group", "id": "q", "label": "Question", "position": [0,0], "grid": { "columns": 1, "rows": 1 },
      "children": [ { "type": "label", "id": "q-text", "position": [0,0], "text": "Capital of France?" } ] },
    { "type": "group", "id": "a", "label": "Answer", "position": [0,0], "grid": { "columns": 1, "rows": 1 },
      "children": [ { "type": "label", "id": "a-text", "position": [0,0], "text": "Paris" } ] }
  ]
}

Open in CAR-TER

Vertical flip with a slow, bouncy turn

A card that tips top to bottom, with a longer bouncy motion and deeper 3D perspective.

JSON 14 lines
{
  "type": "flipCard",
  "id": "tip-card",
  "position": [0, 0],
  "span": [2, 2],
  "flipAxis": "vertical",
  "containerAnimation": { "profile": "bouncy", "duration": 0.8, "bounce": 0.4, "flipPerspective": 0.8 },
  "panels": [
    { "type": "group", "id": "top", "label": "Today", "position": [0,0], "grid": { "columns": 1, "rows": 1 },
      "children": [ { "type": "label", "id": "t-text", "position": [0,0], "text": "Sunny" } ] },
    { "type": "group", "id": "bottom", "label": "Tomorrow", "position": [0,0], "grid": { "columns": 1, "rows": 1 },
      "children": [ { "type": "label", "id": "b-text", "position": [0,0], "text": "Rain" } ] }
  ]
}

Open in CAR-TER

Try it on your phone

carterkit serves a small hub on your computer and pushes one example to CAR-TER on your iPhone or iPad. Pair once with the code it prints.

  1. Install the Python kit.

    pip install carterkit
  2. Show “Status front / actions back” on your phone.

    carterkit demo flipCard --example 'Status front / actions back'
  3. Swap in any example name from this page, or leave --example off for the first one.

carterkit quickstart · Get CAR-TER

actions, and a jump of several faces chains a flip per step.

3D Flip

The card rotates with perspective and back-face culling — the incoming face stays hidden until the half-way point, so it never renders mirrored. Customize via containerAnimation:

Field Type Default Description
profile string bouncy Base spring profile
duration number — Override flip seconds
bounce number — Spring bounce 0–1
multiStep bool true Chain a flip per step on a multi-face jump
stepInterval number 0.12 Seconds between chained flips
flipPerspective number 0.5 3D perspective amount

Theming

Faces are glass cards from the active theme. Set hideBackground on a face for a transparent card.

Generated from ControlDocs/flip-card.md. Something unclear or missing? Tell me.