Styling elements

How to rotate, scale and move elements (Transforms)

How to rotate, scale and move elements (Transforms)

In TeleportHQ, the Transforms section of the right panel rotates, scales, slants and shifts an element without changing the layout around it. Select the element, open Transforms, and set Rotate, Scale, Skew or Translate X and Translate Y. For example, tilt a "New!" badge by 12 degrees, or make a card grow slightly when hovered.

Before you start

  • Transforms are available on every plan.
  • A transform changes how the element looks, not the space it takes up. Elements around it don't move.

Steps

  1. On the canvas, click the element, for example a "New!" badge.
  2. In the right panel, open the Visual tab.
  3. Scroll down to Transforms, near the end of the panel after Backdrop Filter. Click the arrow at the right of its title to open it.
  4. Set the transform you want:
    • Translate X and Translate Y: shift the element right or down, for example 20px. Use negative numbers to shift left or up.
    • Rotate: drag the dial or type an angle, for example 12deg. Use a negative number, such as -12deg, to turn the other way.
    • Skew: drag in the pad, or type X and Y angles, for example 10deg. Dragging in the pad goes up to 45 degrees.
    • Scale: type a size multiplier, for example 1.1 for 10% bigger or 0.9 for 10% smaller.
  5. In Origin, pick the point the element rotates and scales around, for example top left. The default is center.
The Transforms section of the TeleportHQ right panel, with Translate X and Y, the Rotate dial, the Skew pad, Scale, Origin and the Enable 3D box

Check that it worked

The element on the canvas turns, grows or shifts. The elements around it stay in place.

Make an element grow on hover

  1. Select the element, for example a product card.
  2. In States, click + and choose hover.
  3. In Transforms, set Scale to 1.05.
  4. Near the bottom of the canvas, click the hover button on the State: bar to stop editing the hover look.
  5. Click Preview in the bottom toolbar and point at the card. It grows smoothly: adding the first state also gives the element a 0.3-second transition, unless it already has one.

See How to add hover and click effects.

Use 3D transforms

  1. In Transforms, tick Enable 3D. Rotate is replaced by Rotate X, Rotate Y and Rotate Z.
  2. Set Rotate X, Rotate Y or Rotate Z, for example Rotate Y 180deg to flip a card.
  3. Set Translate Z to move the element toward or away from the viewer.
  4. Set Perspective to control the depth effect. A smaller value, such as 600px, looks more dramatic. The default is 1000px.

Troubleshooting

The rotated element overlaps other elements Transforms don't make room for the element. Add margin around it, or set Overflow to hidden on its container in Size.

Scale only takes one number Scale grows or shrinks the element evenly in every direction. The Transforms section can't stretch an element in only one direction. To make it wider or taller, change Width or Height in Size instead.

I can't see the Transforms fields The Transforms section starts closed when it has no values. Click the arrow at the right of its title.

The Transforms values show in grey The transform comes from a CSS class or a larger screen size. Type a value to override it on this element. See How the style panel works.

Good to know

Share

Related Articles

How the style panel works (and where values come from)

When you select an element in TeleportHQ, the right panel shows its settings in Visual and Advanced tabs, always in the same order; values you set show in normal text, while grey values come from a CSS class, a larger screen size, a parent or the browser, and pointing at one shows where it comes from.

How to add hover and click effects (interaction states)

In TeleportHQ, select an element, open States in the right panel, click + and pick a state such as hover, then change the styles; they apply when a visitor hovers, clicks or focuses the element, at every screen size, and fade in with a 0.3-second transition you can change in the Transition section.

How to position elements (Auto, Relative, Freestyle, Fixed, Sticky)

In the TeleportHQ editor, you position an element from the Position section of the right panel by choosing Auto, Relative, Freestyle, Fixed or Sticky, then setting its offsets and Z-index; Freestyle elements can also be dragged on the canvas, where they snap to their neighbours.

Which animation options does TeleportHQ have?

TeleportHQ animates your site with Motion, in any project and on every plan; use Add motion in the right panel for one element, the Motion element for a group, Animate all pages for the whole site, the Transition section for smooth style changes, Scroll Scenes for scroll stories and Page transitions between pages, plus Lottie files and your own CSS.