Badge Strap
An ID card hanging from a band clipped above the top edge. It drops in, swings and twists in a light breeze, stretches when pulled, and can be dragged, thrown and clicked to turn it over. Print your own images on both sides and the band.
pixikit.com/docs/components/badge-strap
Customize
Image fit
Card color
Orientation
Finish
Corner radius0.30
Size0.60
Anchor
Strap length0.50
Strap color
Strap width0.65
Metal
Gravity1.00
Damping0.50
Elasticity0.50
Breeze0.50
Interactive
Intro
Segments10
Fov25°
Props
26| Name | Type | Default | Description |
|---|---|---|---|
frontImage | string | "" | An image printed on the front of the card; any size or shape works. It must allow cross-origin use. |
backImage | string | "" | An image printed on the back; falls back to the front image, then to a plain card. |
imageFit | "cover" | "contain" | "cover" | How the images fit the card: cover fills and crops, contain fits inside on the card colour. |
cardColor | string | "#ffffff" | The colour of the card, shown without an image and around contained images. |
orientation | "portrait" | "landscape" | "portrait" | Whether the card hangs tall or wide. |
finish | "glossy" | "matte" | "holographic" | "metallic" | "glossy" | The surface of the card; holographic adds a foil whose colours shift as it turns, metallic a brushed sheen. |
cornerRadius | number | 0.3 | The roundness of the card corners, 0 square to 1 very round. |
size | number | 0.6 | The height of the card as a share of the container height. |
anchor | "left" | "center" | "right" | "center" | Where the band hangs from along the top edge. |
strapLength | number | 0.5 | How far below the top edge the card hangs, 0 short to 1 long. |
strapImage | string | "" | An image printed along the band; a wide image repeats along its length. |
strapColor | string | "#111111" | The colour of the band without a band image, also the accent of the generated name card. |
strapWidth | number | 0.65 | The width of the band against its default, 0.4 to 2. |
metal | "graphite" | "silver" | "gold" | "silver" | The finish of the clamp and the ring that hold the card. |
gravity | number | 1 | How strongly the card falls; lower floats and swings slowly, 0 turns gravity off. |
damping | number | 0.5 | How quickly the swing dies down, 0 a long sway to 1 a quick settle. |
elasticity | number | 0.5 | How hard the band snaps the card back after it is stretched and let go. |
breeze | number | 0.5 | A gentle, changing wind that keeps the card moving when nobody touches it. |
interactive | boolean | true | Visitors can drag, stretch and throw the card, and click it to turn it over. |
intro | boolean | true | The card drops in from the side on mount and swings into place. |
name | string | "" | A name for the generated card, drawn when there is no front image. |
role | string | "" | The role printed under the name on the generated card. |
segments | number | 10 | How many links the band is made of; more bends smoother. |
fov | number | 25 | The camera's field of view in degrees; lower is flatter. |
className | string | None | |
style | CSSProperties | None | Inline styles for the root element. |