Pinned
Soren
Soren reposted
Soren reposted
recreated this component from Linear's homepage. here using `useSpring` from motion/react (@motion.dev). using a spring will always feel more fluid and natural for interactions that aren't strictly mapped to the cursor.
recreated this component from Linear's homepage. here using `useSpring` from motion/react (@motion.dev). using a spring will always feel more fluid and natural for interactions that aren't strictly mapped to the cursor.
Soren reposted
another good example of `tabular-nums` in action. must have for columns of right-aligned numbers (tables, invoices, dashboards). normal table's columns have ragged left edges as digits swap between narrow ("1") and wide ("0", "8") glyphs. where tabular stays perfectly flush ~
`tabular-nums` should be the default for any number that updates ( timers, counters, prices, percentages, scores, live data etc ). you can enable this tnum OpenType feature using the CSS property `font-variant-numeric`. .tabular-nums { font-variant-numeric: tabular-nums; }
Soren reposted
another good example of `tabular-nums` in action. must have for columns of right-aligned numbers (tables, invoices, dashboards). normal table's columns have ragged left edges as digits swap between narrow ("1") and wide ("0", "8") glyphs. where tabular stays perfectly flush ~
`tabular-nums` should be the default for any number that updates ( timers, counters, prices, percentages, scores, live data etc ). you can enable this tnum OpenType feature using the CSS property `font-variant-numeric`. .tabular-nums { font-variant-numeric: tabular-nums; }
Soren reposted
"w/o prediction cone" VS "w/ prediction cone"
prediction cone/safe triangle — this is something we take so much for granted in modern day native UIs. but it's not the same for most web-based dropdown menus. it took me a while to implement this here. Amazon, macOS, Windows all implement some version of this.
Soren reposted
Soren reposted
a "Table of Contents" component inspired from devouringdetails.com . tho this is a bit simpler version for my blogs ( you can see them here sorenblank.com/writing ). you can try it from here: sorenblank.com/writing/scroll-tracking-table-of-contents
Soren reposted
Soren reposted
Soren reposted
SVG dashed animation on buttons ~ i've been experimenting how i can use this effect in different ui components. it goes well with buttons i think. looks pretty seamless when you are using it along some transform movements of the component.
SVG is really fun! here my recent exploration of svg dashed animations for tryarchitect. `stroke-dashoffset` being used here to animate the offset effect. can be bit tricky. @keyframe { from { stroke-dashoffset: 0; } to { stroke-dashoffset: ${-dashCycle}; } }
a "Table of Contents" component inspired from devouringdetails.com . tho this is a bit simpler version for my blogs ( you can see them here sorenblank.com/writing ). you can try it from here: sorenblank.com/writing/scroll-tracking-table-of-contents
SVG dashed animation on buttons ~ i've been experimenting how i can use this effect in different ui components. it goes well with buttons i think. looks pretty seamless when you are using it along some transform movements of the component.
SVG is really fun! here my recent exploration of svg dashed animations for tryarchitect. `stroke-dashoffset` being used here to animate the offset effect. can be bit tricky. @keyframe { from { stroke-dashoffset: 0; } to { stroke-dashoffset: ${-dashCycle}; } }
Soren reposted
Soren reposted
the sidebar icon now matches the state or the state it will go to :33 css is nice ngl.
so much you can do in css using pseudo classes. used `:has` pseudo class to make the full hover animation here. for hover state im doing `:has(*:is(.sidebar-icon-trigger:hover` made only using css. no js listener used. took me longer than i thought it would.
Soren reposted
smooth radius transform accordion component using css. no framer motion used here. for auto height transition using css `grid` inspired by @jhey.dev. when collapsed `grid-rows-[0fr]` and expanded `grid-rows-[1fr]`. and that with `ease-out-cubic` with `300ms` makes it feel just perfect ~
Soren reposted
Soren reposted
Soren reposted
Soren reposted
Soren reposted
smooth radius transform accordion component using css. no framer motion used here. for auto height transition using css `grid` inspired by @jhey.dev. when collapsed `grid-rows-[0fr]` and expanded `grid-rows-[1fr]`. and that with `ease-out-cubic` with `300ms` makes it feel just perfect ~
inspecting an element's animation using dev tools!? this looks so cool. I didn't know one could do this fr. it doesn't look this cool in firefox tho. plus I couldn't find an option hide the inspect tooltip on firefox. on chrome holding ctrl hides the tooltip while inspecting.
a simpler version of Linear's orbiting loader made only using css `keyframes` and `preserve-3d` transform-style for positioning children in 3d-space. no js used here at all. so much you can achieve with `translateZ()`and `rotateY()` css transform functions.
the sidebar icon now matches the state or the state it will go to :33 css is nice ngl.
so much you can do in css using pseudo classes. used `:has` pseudo class to make the full hover animation here. for hover state im doing `:has(*:is(.sidebar-icon-trigger:hover` made only using css. no js listener used. took me longer than i thought it would.