Skip navigation
Doing this still gives some minor layout shifts.
0:00 / 0:21

Doing this still gives some minor layout shifts.

Dhruvin

@writenicecode3.6K followers

Visit on X
805 likesDownloadOriginal post

65,739 views

Doing this still gives some minor layout shifts. rather use a absolute positioned flex centered element in a container with the original element to keep track of the width. Gives 0 layouts shifts and also works great with large font weights transitions

22 Comments

Comments from the original post on X (Twitter)

  • Vlad Moroz's profile picture

    @vladmoroz

    check equal width fonts, Booton is a great one

    9 likes

  • Dhruvin's profile picture

    @writenicecode

    just checked it out, looks clean!

  • Daman's profile picture

    @daman76752

    how you made those tasteful animations bro ?

    2 likes

  • Aman's profile picture

    @amanshakya0018

    new agency, nice.

    1 like

  • Daniel White's profile picture

    @dwhitedesign

    beautiful animations man great job

    1 like

  • peacenode.eth✰'s profile picture

    @peace_node

    This is great

    1 like

  • Kevin ⨀'s profile picture

    @kvncnls

    Is the page responsive?

    1 like

  • Dhruvin's profile picture

    @writenicecode

    yeah. It's smaller around 540px in width. zoomed in for presentation so the animations are cleanly visible

  • Kevin ⨀'s profile picture

    @kvncnls

    Curious how you’re making it responsive between mobile, tablet and desktop. I typically use GSAP’s SplitText plugin with its built-in text-wrapping features, but if you’re using absolute positioning, it’ll be quite different!

  • Dhruvin's profile picture

    @writenicecode

    Check this out!

    3 likes

  • David's profile picture

    @drgvcz

    This looks very fucking clean bro Damn

    1 like

  • Crypto Fund Trader's profile picture

    @pepysbo14943

    Clever trick, thanks for sharing!

  • Jeremy Cameron's profile picture

    @jeremycameron

    What website is this?

  • Dhruvin's profile picture

    @writenicecode

    not live yet, it's for my new agency

    1 like

  • Derek Castelli's profile picture

    @heyderekj

    ✍️

  • evie's profile picture

    @shakily

    do u have library for these icons?

  • Dhruvin's profile picture

    @writenicecode

    @nucleoicons always

    2 likes

  • Dean Guo's profile picture

    @fourestfire

    looks sick. the polish and animation stage is so fun

  • Andreas Kruszakin-Liboska's profile picture

    @andreaskruszaki

    That’s actually great tip! Anything else to keep in mind?

  • Ritesh n.'s profile picture

    @Riteshxdev

    how do you animate that and make it interactive please tell