Skip to content

Transform Origin

Set transform origin point

Syntax

visual="origin:[value]"

Values

ValueCSS OutputDescription
centertransform-origin: centerCenter origin
toptransform-origin: topTop origin
top-righttransform-origin: top rightTop right
righttransform-origin: rightRight origin
bottom-righttransform-origin: bottom rightBottom right
bottomtransform-origin: bottomBottom origin
bottom-lefttransform-origin: bottom leftBottom left
lefttransform-origin: leftLeft origin
top-lefttransform-origin: top leftTop left

Examples

html
<div visual="rotate:45 origin:top-left">Rotate from corner</div>

Preview

Transform Origin

visual="origin:center" - Set the pivot point for transforms

center
top-left
View Code
html
<div layout="flex" space="g:big p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
  <div space="p:small" visual="bg:primary text:white rounded:small rotate:45 origin:center">center</div>
  <div space="p:small" visual="bg:primary text:white rounded:small rotate:45 origin:top-left">top-left</div>
</div>

Arbitrary Values

Supports custom values using bracket syntax:

html
<div visual="transform:[custom-value]">Custom</div>