Skip to content
PixiKit

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
NameTypeDefaultDescription
frontImagestring""An image printed on the front of the card; any size or shape works. It must allow cross-origin use.
backImagestring""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.
cardColorstring"#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.
cornerRadiusnumber0.3The roundness of the card corners, 0 square to 1 very round.
sizenumber0.6The 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.
strapLengthnumber0.5How far below the top edge the card hangs, 0 short to 1 long.
strapImagestring""An image printed along the band; a wide image repeats along its length.
strapColorstring"#111111"The colour of the band without a band image, also the accent of the generated name card.
strapWidthnumber0.65The 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.
gravitynumber1How strongly the card falls; lower floats and swings slowly, 0 turns gravity off.
dampingnumber0.5How quickly the swing dies down, 0 a long sway to 1 a quick settle.
elasticitynumber0.5How hard the band snaps the card back after it is stretched and let go.
breezenumber0.5A gentle, changing wind that keeps the card moving when nobody touches it.
interactivebooleantrueVisitors can drag, stretch and throw the card, and click it to turn it over.
introbooleantrueThe card drops in from the side on mount and swings into place.
namestring""A name for the generated card, drawn when there is no front image.
rolestring""The role printed under the name on the generated card.
segmentsnumber10How many links the band is made of; more bends smoother.
fovnumber25The camera's field of view in degrees; lower is flatter.
classNamestringNone
styleCSSPropertiesNoneInline styles for the root element.

Related