Reference
CSS properties
Every Kinesis property with its values, syntax, initial value, and JavaScript name.
Every property is registered with @property, so values are checked and resolved by the browser like any typed CSS property. The JavaScript name is the same word in camelCase; see JavaScript.
Context
Inherited, so you can set them once on a scope.
--k-motion
motionHow values travel: a spring preset, or custom stiffness and damping.
- Values
instant,smooth(default),soft,snappy,bouncy,heavy, or<stiffness> <damping> [<mass>]- Syntax
<custom-ident> | <number>+- Initial
smooth- Inherited
- yes
--k-motion: bouncy;Guide →--k-intensity
intensityMultiplies every pointer effect. Handy in media queries.
- Values
- a number;
1by default - Syntax
<number>- Initial
1- Inherited
- yes
--k-intensity: 0.5;Guide →--k-perspective
perspectiveCamera distance given to the parent of a tilted element.
- Values
- a length;
1000pxby default - Syntax
<length>- Initial
1000px- Inherited
- yes
--k-perspective: 700px;Guide →Pointer effects
--k-parallax
parallaxDrifts against the pointer. Negative values drift with it.
- Values
- one length (both axes) or two (x y)
- Syntax
<length>+- Initial
0px- Inherited
- no
--k-parallax: 30px 12px;Guide →--k-tilt
tiltTurns toward the pointer in 3D.
- Values
- one angle (both axes) or two (x y)
- Syntax
<angle>+- Initial
0deg- Inherited
- no
--k-tilt: 10deg;Guide →--k-depth
depthLifts an element toward the viewer, above a tilted ancestor.
- Values
- a length
- Syntax
<length>- Initial
0px- Inherited
- no
--k-depth: 40px;Guide →--k-magnetic
magneticLeans toward the pointer when it comes within `--k-radius`.
- Values
- a number: the share of the distance to travel, e.g.
0.3 - Syntax
<number>- Initial
0- Inherited
- no
--k-magnetic: 0.3;Guide →--k-repel
repelMoves away from the pointer when it comes within `--k-radius`.
- Values
- a length: the largest distance to move
- Syntax
<length>- Initial
0px- Inherited
- no
--k-repel: 24px;Guide →--k-follow
followChases the pointer while it is in the area.
- Values
- a number:
1reaches the pointer,0.5goes halfway - Syntax
<number>- Initial
0- Inherited
- no
--k-follow: 1;Guide →--k-look
lookTurns in 3D to face the pointer, reaching the full angle at `--k-radius`.
- Values
- an angle
- Syntax
<angle>- Initial
0deg- Inherited
- no
--k-look: 25deg;Guide →--k-point
pointRotates flat to point at the pointer.
- Values
- the direction your artwork faces, like gradient angles:
0degup,90degright - Syntax
none | <angle>- Initial
none- Inherited
- no
--k-point: 0deg;Guide →--k-spin
spinRotates flat as the pointer moves across the area, like turning a dial.
- Values
- an angle: the rotation at the edge of the area (
--k-axis: yfollows vertical movement) - Syntax
<angle>- Initial
0deg- Inherited
- no
--k-spin: 180deg;Guide →Reactions
--k-when
whenWhat the element reacts to. Its outputs move from their first value to their second.
- Values
near,hover,press,view,view once,scroll, orpage- Syntax
none | <custom-ident>+- Initial
none- Inherited
- no
--k-when: view once;Guide →--k-delay
delayWaits before a hover, press, or view reaction starts.
- Values
- a time
- Syntax
<time>- Initial
0s- Inherited
- no
--k-delay: 120ms;Guide →--k-stagger
staggerAdds this much delay per sibling, so a list reacts in order.
- Values
- a time
- Syntax
<time>- Initial
0s- Inherited
- no
--k-stagger: 60ms;Guide →--k-index
indexOverrides the position used by `--k-stagger`. Text splitting sets it for you.
- Values
- an integer
- Syntax
<integer>- Initial
-1- Inherited
- no
--k-index: 3;Guide →Reaction outputs
Each takes one value (from rest to this) or two (from, to).
--k-x
xHorizontal offset during a reaction.
- Values
to(from 0) orfrom to- Syntax
<length>+- Initial
0px- Inherited
- no
--k-x: -20px 0;Guide →--k-y
yVertical offset during a reaction.
- Values
to(from 0) orfrom to- Syntax
<length>+- Initial
0px- Inherited
- no
--k-y: 24px 0;Guide →--k-rotate
rotateRotation during a reaction.
- Values
to(from 0deg) orfrom to- Syntax
<angle>+- Initial
0deg- Inherited
- no
--k-rotate: -8deg 8deg;Guide →--k-scale
scaleScale during a reaction. Respects your `transform-origin`.
- Values
to(from 1) orfrom to- Syntax
none | <number>+- Initial
none- Inherited
- no
--k-scale: 1.1;Guide →--k-opacity
opacityOpacity during a reaction. Keeps working with reduced motion.
- Values
to(from 1) orfrom to- Syntax
none | <number>+- Initial
none- Inherited
- no
--k-opacity: 0 1;Guide →--k-blur
blurBlur during a reaction, added after any filter you set.
- Values
to(from 0) orfrom to- Syntax
<length>+- Initial
0px- Inherited
- no
--k-blur: 8px 0;Guide →--k-color
colorText color during a reaction, mixed in Oklab by the browser.
- Values
- any CSS color:
to(from the current color) orfrom to - Syntax
none | <color>+- Initial
none- Inherited
- no
--k-color: tomato;Guide →--k-background
backgroundBackground color during a reaction.
- Values
- any CSS color:
to(from the current background) orfrom to - Syntax
none | <color>+- Initial
none- Inherited
- no
--k-background: #2f6bff;Guide →Drag
--k-drag
dragLets the element be dragged.
- Values
both,x, ory- Syntax
none | x | y | both- Initial
none- Inherited
- no
--k-drag: both;Guide →--k-bounds
boundsKeeps a dragged element inside a box, with an elastic edge.
- Values
none(default),parent,scope, orviewport- Syntax
none | parent | scope | viewport- Initial
none- Inherited
- no
--k-bounds: parent;Guide →--k-release
releaseWhat happens when a drag ends.
- Values
throw(default, glides with momentum),stay, orreturn(springs home)- Syntax
throw | stay | return- Initial
throw- Inherited
- no
--k-release: return;Guide →Modifiers
--k-area
areaWhere the pointer is measured for parallax, tilt, follow, and spin.
- Values
scope(default: the nearest[data-kinesis]),self, orviewport- Syntax
scope | self | viewport- Initial
scope- Inherited
- no
--k-area: self;Guide →--k-radius
radiusHow far the pointer reaches for `near`, `magnetic`, `repel`, and `look`.
- Values
- a length;
200pxby default - Syntax
<length>- Initial
200px- Inherited
- no
--k-radius: 140px;Guide →--k-limit
limitCaps how far pointer effects can move the element.
- Values
none(default) or a length- Syntax
none | <length>- Initial
none- Inherited
- no
--k-limit: 12px;Guide →--k-axis
axisRestricts pointer effects and distance to one axis.
- Values
both(default),x, ory- Syntax
both | x | y- Initial
both- Inherited
- no
--k-axis: x;Guide →--k-track
trackWrites the pointer position over the element to `--k-pointer-x` and `--k-pointer-y`.
- Values
none(default) orpointer- Syntax
none | pointer- Initial
none- Inherited
- no
--k-track: pointer;Guide →Written by Kinesis
Read these in your own CSS. Kinesis writes them inline on the element.
--k-progress
Written by Kinesis: the current reaction progress, from 0 to 1. Inherited, so children can use it too.
- Values
- a number (springs can overshoot)
- Syntax
<number>- Initial
0- Inherited
- yes
opacity: var(--k-progress);Guide →--k-pointer-x
Written by Kinesis with `--k-track: pointer`: the pointer's x over the element, 0 (left) to 1 (right).
- Values
- a number
- Syntax
<number>- Initial
0.5- Inherited
- yes
left: calc(var(--k-pointer-x) * 100%);Guide →--k-pointer-y
Written by Kinesis with `--k-track: pointer`: the pointer's y over the element, 0 (top) to 1 (bottom).
- Values
- a number
- Syntax
<number>- Initial
0.5- Inherited
- yes
top: calc(var(--k-pointer-y) * 100%);Guide →