Shu Profile Banner
Shu Profile
Shu

@shuding_

Followers
36,363
Following
2,262
Media
369
Statuses
2,582

@vercel . @nextjs , @v0 , Satori, SWR. Don’t talk unless you can improve the silence.

Berlin, Germany
Joined March 2012
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
@shuding_
Shu
1 year
My 10 years on GitHub
Tweet media one
138
594
11K
@shuding_
Shu
11 months
Depth-based blur in CSS. (Chrome preferred)
Tweet media one
Tweet media two
Tweet media three
Tweet media four
52
558
7K
@shuding_
Shu
2 years
Fade-in animation that is not so boring: { 0% { opacity: 0; filter: brightness(1) blur(20px) } 10% { opacity: 1; filter: brightness(2) blur(10px) } 100% { opacity: 1; filter: brightness(1) blur(0) } }
47
359
4K
@shuding_
Shu
2 years
Another one, very subtle this time: { 0% { mask: linear-gradient(90deg, #000 25%, #000000e6 50%, #00000000 ) 150% 0 / 400% no-repeat; opacity: .2; } 100% { mask: linear-gradient(90deg, #000 25%, #000000e6 50%, #00000000 ) 0 / 400% no-repeat; opacity: 1; } }
29
229
3K
@shuding_
Shu
2 years
I made a while ago: a 5kB globe lib, and it improved our page performance* by almost 60%. How is it created? Time for a WebGL & shader thread!
32
286
2K
@shuding_
Shu
1 year
I deployed it!
@shuding_
Shu
1 year
With Next.js’ app directory and that new idea, it takes less than 150 lines of code to create this. ~4 lines are actually related to animation (wrapping the tree with <Satori>):
25
178
2K
36
169
2K
@shuding_
Shu
1 year
Statically typed links are coming to @nextjs : ◆ Autocompletion ◆ Error on invalid routes ◆ Prevents 404 links during build ◆ Dynamic, catch-all, and optional catch-all routes ◆ Works with both `pages` and `app` ◆ No extra configuration needed!
49
212
2K
@shuding_
Shu
3 years
A 20x faster, realtime Next.js dev experience is coming… (the debug toasts show actual latency figures on our large production codebase)
26
192
2K
@shuding_
Shu
1 year
With Next.js’ app directory and that new idea, it takes less than 150 lines of code to create this. ~4 lines are actually related to animation (wrapping the tree with <Satori>):
@shuding_
Shu
1 year
A gallery example:
4
7
322
25
178
2K
@shuding_
Shu
2 years
The @vercel dashboard has been growing with new features and more engineers joining the team. How do we keep it fast? Here’s a thread...
Tweet media one
22
244
2K
@shuding_
Shu
1 year
React Wrap Balancer: Simple React Component That Makes Titles More Readable
41
163
2K
@shuding_
Shu
1 year
There’s a trend of using rotating gradients as input / button borders with CSS. Here’s a neat trick to enhance its appearance:
20
131
1K
@shuding_
Shu
9 months
Best book I read this year!
Tweet media one
27
58
1K
@shuding_
Shu
3 months
@rauchg
Guillermo Rauch
3 months
AG(UI) has been achieved internally
24
12
481
48
95
1K
@shuding_
Shu
28 days
Easy-to-use CSS View Transitions API helpers for Next.js App Router:
28
120
1K
@shuding_
Shu
9 months
5 years, glad that we’ve made something
Tweet media one
32
17
1K
@shuding_
Shu
8 months
CSS-only scroll area indicator using `scroll-timeline`. The trick is to simply add an opacity animation, controlled by that timeline, to these 2 arrow elements.
14
112
985
@shuding_
Shu
2 years
Some tech details and stories behind @vercel ’s OG image generation and Satori lib... There’s been a demand to generate dynamic and fancy OG images for a long time. And we have some solutions but they all seem to be a little “limited”.
18
118
899
@shuding_
Shu
1 year
Nextra 2.0 is here: 🔹 Redesigned UI 🔹 Image optimization 🔹 Built-in full-text search 🔹 Build-time code highlighting 🔹 MDX v2 🔹 Next SEO 🔹 Multiple docs zones 🔹 Menus and separators 🔹 ...
23
117
818
@shuding_
Shu
3 years
I refactored the React Server Components example on top of Next.js and deployed it serverlessly to @vercel . Check out the tech preview demo:
13
114
754
@shuding_
Shu
3 years
GitHub Copilot is definitely more than just an autocompletion tool, it tries to understand the code you're writing. Have been using it for weeks and it's truly amazing.
3
90
673
@shuding_
Shu
29 days
I’m redesigning my website on top of some exciting new things: Next.js App Router, Turbopack, CSS View Transitions, Tailwind CSS 4.0, MDX in RSC. Will have it open sourced when it’s ready :) Interestingly Turbopack, Tailwind and MDX compilers are all backed by Rust now.
17
38
659
@shuding_
Shu
1 year
How does SSR work? Components are executed in 2 places:
5
72
604
@shuding_
Shu
2 years
A little helper hook I made a while ago: it quickly tells you when, where and why does a render happen.
Tweet media one
15
59
601
@shuding_
Shu
3 months
My React Server Components (RSC) mental model is basically: They’re getServerSideProps / getStaticProps but more powerful. Things RSC / gSSP / gSP share in common: 🔸 You can’t pass things like normal functions from RSC / gSSP / gSP to the client, because they just can’t be…
Tweet media one
12
85
598
@shuding_
Shu
2 years
I like this idea a lot and after many years, finally brought it to life... CSS-only magnifier! The demo doesn’t have any JavaScript. Will share the code next week, but I believe some of you can already figure it out :D
14
31
588
@shuding_
Shu
3 years
Open your browser console on and you can use it as a REPL of the lib:
Tweet media one
9
68
552
@shuding_
Shu
2 months
There are many ideas that can be built with the new AI SDK. I’ll post some of my favorites. Let’s start with render():
@vercel
Vercel
2 months
AI SDK 3.0 ◆ Generative UI (alpha) ◆ Assistant Tools APIs ◆ Mistral, Azure, Perplexity, and Gemini support
55
199
2K
6
38
538
@shuding_
Shu
3 years
Since iOS 13.4+, it's possible to make touch-friendly carousels on the Mobile Web! I just fixed this for Next.js Commerce: Demo: PR:
12
40
529
@shuding_
Shu
2 years
Mask animations are really underrated. Another good use case I have:
@shuding_
Shu
2 years
Another one, very subtle this time: { 0% { mask: linear-gradient(90deg, #000 25%, #000000e6 50%, #00000000 ) 150% 0 / 400% no-repeat; opacity: .2; } 100% { mask: linear-gradient(90deg, #000 25%, #000000e6 50%, #00000000 ) 0 / 400% no-repeat; opacity: 1; } }
29
229
3K
5
24
499
@shuding_
Shu
8 months
I spent a month in NYC & SF preparing for the launch of with the team — it went smoothly. On the night of release, while flying back to Europe, I was treated to a stunning aurora over the Greenland skies. Breathtaking.
Tweet media one
11
4
468
@shuding_
Shu
1 year
This is how we made @Vercel ’s blog titles more readable. Engineering blog post about this coming soon :) Before/after:
Tweet media one
@shuding_
Shu
1 year
React Wrap Balancer: Simple React Component That Makes Titles More Readable
41
163
2K
9
36
460
@shuding_
Shu
11 months
The new React Wrap Balancer 1.0 version now uses the native CSS feature `text-wrap: balance` automatically when it’s available! Read more about the release: CSS `text-wrap: balance`:
9
51
449
@shuding_
Shu
4 months
Another CSS-only toy: Color Picker. Built with 790 `:has()` selectors.
8
31
431
@shuding_
Shu
3 months
UIs that are 1) context-aware 2) dynamically streamed from the server 3) interactive 4) stateful in both server and client 5) hooked into LLMs. Will share more and open source it very soon.
Tweet media one
@rauchg
Guillermo Rauch
3 months
We'll be open sourcing an LLM → UI streaming mechanism powered by the @vercel AI SDK and RSC. It will help you build rich AI apps that go beyond text and markdown, with optimal performance and robustness to UI state changes.
62
91
1K
14
24
424
@shuding_
Shu
11 months
Video:
6
22
412
@shuding_
Shu
4 years
After 11 beta releases and weeks of testing, we launched SWR v0.3.0! 🎊 v0.3.0 includes tons of bug fixes, enhancements and test cases, as well as a new dedicated pagination/infinite loading API. Check out the docs:
6
59
413
@shuding_
Shu
1 year
Guess I really love CSS and I’m obsessed with the idea of CSS-only challenges. There are some interesting tricks used and someday I’ll write about them... Here are a few of them:
10
17
409
@shuding_
Shu
2 years
Reduced it to 7kB gipped including the texture, here is how it looks:
@shuding_
Shu
2 years
Status: creating the smallest WebGL globe lib: ~15kB including texture. (Note that Three.js itself is around 150kB)
4
2
93
9
10
408
@shuding_
Shu
2 years
It’s been 4 years since I joined @vercel , proud of everything we’ve achieved together and looking forward to the future ✨
19
3
390
@shuding_
Shu
1 year
Some recent updates for @vercel ’s OG image generation and Satori: 🔹 Flex gap is now supported 🎉 🔹 HTML lang= attr 🎉 🔹 currentColor 🎉 🔹 Improvements related to emojis, viewBox, data URI, break-word, white-space and more
10
27
379
@shuding_
Shu
2 years
Working on Nextra 2.0... - Redesigned UI - Rewritten in TypeScript - Turborepo - MDX 2 - Tailwind 3 - FlexSearch Built-in - Shiki - pnpm
Tweet media one
22
21
374
@shuding_
Shu
4 months
Image generation in 100ms, powered by :
@brotzky_
Brotzky
4 months
This is now the fastest SVG chart -> PNG generation I've ever seen.
2
1
72
4
21
360
@shuding_
Shu
3 years
'RSC'.reverse() == 'CSR' This is how React Server Components work. And I’ll explain it a bit more in the thread...
4
71
348
@shuding_
Shu
3 months
Trying to visualize that Server-Side Rendering (SSR) isn't just about SEO, it actually makes the site faster. And why PPR is the goat. Main cost = 🟥 JS load & Hydration 🟡⇆🔵 Region Latency
Tweet media one
Tweet media two
11
32
336
@shuding_
Shu
2 years
My favorite thing about variable fonts is that you can animate the weight (font-variation-settings: 'wght' 600) smoothly:
4
15
333
@shuding_
Shu
10 months
@drwpwrs @Riyaadh_Abr @TkDodo You can achieve streaming using recursive promises:
Tweet media one
8
34
328
@shuding_
Shu
1 year
A gallery example:
4
7
322
@shuding_
Shu
8 months
@vercel
Vercel
8 months
v0 by Vercel Labs Generate UI with simple text prompts. Copy, paste, ship. Explore the prompt library and join the waitlist today.
212
943
5K
10
28
316
@shuding_
Shu
1 year
...when using a straight line to fit exponential data, you overestimate the near future but underestimate the far future, like this:
Tweet media one
3
27
297
@shuding_
Shu
2 years
Not just Open Graph images, Satori can be used to generate all kinds of images too! For example a Syntax Highlighter:
6
24
296
@shuding_
Shu
11 months
Going to convert markers of to attributes of a new vertex shader. This works similar to a particle system, and it is more performant than the for loop in our current fragment shader (so you can add more markers!). Next is arcs and DOM nodes/events.
3
21
279
@shuding_
Shu
4 years
Apple’s HIG is a gold mine.
Tweet media one
3
24
271
@shuding_
Shu
3 years
Did some research on metaballs today... got some interesting renderings w/ React and WebGL. Also tried for the first time, it's such an amazing tool...
Tweet media one
Tweet media two
5
17
267
@shuding_
Shu
2 years
Image generation with HTML and CSS (or Tailwind CSS) at the Edge (or Node.js/browser). 5x faster, 100x smaller, 160x cheaper than our old solution. Try it: Powered by Satori and Resvg.
@vercel
Vercel
2 years
Vercel OG Image Generation – a new library for generating dynamic social card images.
57
296
2K
4
15
267
@shuding_
Shu
7 months
For those who love the idea of Zero JS: use <textarea> and CSS container query to make interactive sliders!
13
25
262
@shuding_
Shu
7 months
Poured my thoughts into an article about Barrel Optimization in Next.js. If you’re as fascinated by frameworks and bundlers, give it a read!
@nextjs
Next.js
7 months
Learn about the hidden cost with JavaScript runtimes. By optimizing package imports, we’ve seen 40% faster cold boots when using libraries with many barrel files.
9
142
1K
14
15
263
@shuding_
Shu
2 months
Use the platform (nah)
Tweet media one
12
10
259
@shuding_
Shu
1 year
And I’ll try to draw some diagrams to show how I visualize Server Actions in my head and how they work, as I saw some confusion around. There’re two ways of using Server Actions: 1. Define Server Actions in Server Components and pass them to Client Components via props...
4
45
258
@shuding_
Shu
2 years
The best part: it’s SVG!
@shuding_
Shu
2 years
Not just Open Graph images, Satori can be used to generate all kinds of images too! For example a Syntax Highlighter:
6
24
296
5
24
250
@shuding_
Shu
2 years
Weirdest bug this week: iOS Safari renders long digits (e.g. 1111111111) as a telephone link that breaks hydration. To avoid, add `<meta name="format-detection" content="telephone=no">`. Maybe can be a common thing as any dynamic content may run into it.
Tweet media one
5
18
248
@shuding_
Shu
1 year
Tailwind CSS is a good abstraction.
8
4
249
@shuding_
Shu
7 months
Created an interactive macOS dock in 1min using .
7
8
240
@shuding_
Shu
4 years
Just noticed that most Touch Events APIs are now supported in iOS Safari, including `touchType` (👆/✍️), `force`, `altitudeAngle`, and `azimuthAngle`! This is so powerful that you can create a fully Web based drawing app w/ brushes! Here's a simple demo: .
Tweet media one
Tweet media two
5
50
245
@shuding_
Shu
1 year
That’s it! You can find the code here: (Note that the demo uses ` @property `, but you can also make an extra div and use CSS `rotate` if that’s an issue)
10
18
245
@shuding_
Shu
11 months
Vercel AI SDK, Next.js & Nextra, Cobe, SWR on one picture 🥁
Tweet media one
5
12
240
@shuding_
Shu
4 years
Published v0.1.10 of SWR with a bunch of improvements: ◆ Query variables ◆ React Native ◆ 28% Smaller (3.4k gzipped) ◆ Improved TS support ◆ Improved performance ◆ Examples of subscription, prefetching and many more ◆ Smart error retries
9
41
236
@shuding_
Shu
2 years
When reviewing PRs especially in open source projects, remember to also take a look at npm/yarn/pnpm lockfile changes. They can be used to attack the project by introducing malicious dependencies. Like this:
Tweet media one
6
24
236
@shuding_
Shu
8 months
Now is out, I can share one of my early @vercel internal demos created back in March.
6
17
227
@shuding_
Shu
3 years
Better type inference is coming to SWR soon! • Key / arguments • Conditional / dependent • Constant keys • Returned data
Tweet media one
4
26
227
@shuding_
Shu
1 year
That globe on the @supabase website looks pretty cool! ⚽️
4
24
228
@shuding_
Shu
1 year
What if there’s a <Satori> component that adds fluid layout & style transitions to your elements?
6
12
227
@shuding_
Shu
1 year
Just in case you weren’t aware, enabling the `experimental.typedRoutes` feature in @nextjs automatically checks for invalid links, along with support for rewrites and redirects!
Tweet media one
5
15
217
@shuding_
Shu
8 months
Tweet media one
10
1
222
@shuding_
Shu
1 year
Adding `text-wrap: balance` to Satori, cc @lachlanjc @andrewingram
7
4
219
@shuding_
Shu
9 months
Sunday night CSS toy
10
3
212
@shuding_
Shu
8 months
Tip: you can use “advanced” CSS features like `mask-image` and `text-wrap: balance` in Satori and @vercel /og. Very helpful for social cards!
Tweet media one
5
14
209
@shuding_
Shu
1 year
Have been working on implementing Server Actions in Next.js with the team for the past 5 months (and yes, it still feels magical), couldn’t be happier to see it come to life. Thanks @sebmarkbage @feedthejim @acdlite @kdy1dev ❤️
@vercel
Vercel
1 year
Next.js 13.4 ◆ App Router (Stable) ◆ Turbopack (Beta) ◆ Server Actions (Alpha)
85
663
3K
6
9
211
@shuding_
Shu
1 year
I didn’t expect this to get so much attention... thanks everyone! 🙇‍♂️ What I learned from it was “people overestimate what they can do in a year and underestimate what they can do in 10 years” by @BillGates . We are good at predicting things linearly but the world is exponential:
1
13
209
@shuding_
Shu
1 year
If you want to know what’s the performance impact of React Wrap Balancer, I just wrote about it in the docs:
Tweet media one
3
10
204
@shuding_
Shu
4 years
The latest version of React DevTools now shows the names of custom hooks! 🎉🎉🎉 It makes debugging so much easier!
Tweet media one
5
50
195
@shuding_
Shu
3 years
This one is my favorite:
Tweet media one
1
20
198
@shuding_
Shu
2 years
Tweet media one
13
3
192
@shuding_
Shu
11 months
@DanHollick Yep you got it!! Incredible visualization!
1
0
194
@shuding_
Shu
11 months
This was inspired by @artur_bien ’s “Blur Vignette effect in CSS”:
@artur_bien
Artur Bień
11 months
New blog post - "Blur Vignette effect in CSS" 🔥 I've also built a CSS generator for this effect so you can easily drop it in your projects. More details below 👇
15
78
774
0
10
191
@shuding_
Shu
10 months
Delivered some value last week! Next.js canary now automatically optimizes barrel file imports of popular libs (lucide-react, react-bootstrap, ant-design/icons, etc.). A more advanced config is also available for your internal component system to use:
Tweet media one
7
13
181
@shuding_
Shu
1 year
As promised, autocompletion and docs on typing and hover (and CMD+click cc @wongmjane ):
@leeerob
Lee Robinson
1 year
Coming soon to @nextjs – improved SEO support!
Tweet media one
185
563
5K
6
12
188
@shuding_
Shu
4 years
Performance is a top priority of SWR. On this dedicated docs page, we’ll explain why and how SWR ensures your app to be always fast and reactive: ✅ No extra requests ✅ No extra re-renders ✅ No extra code imported
5
21
184
@shuding_
Shu
1 year
👇 ...all the fields will be typed, with autocompletion and docs on typing and hover!
@leeerob
Lee Robinson
1 year
Coming soon to @nextjs – improved SEO support!
Tweet media one
185
563
5K
2
10
183
@shuding_
Shu
1 year
Got some of my recent code art printed!
Tweet media one
6
2
176
@shuding_
Shu
3 months
Not 100% yet but I'm very proud of SWR’s test coverage:
Tweet media one
5
0
175
@shuding_
Shu
2 months
“Give people wonderful tools, and they’ll do wonderful things.”
9
20
171
@shuding_
Shu
5 years
Beta test the VSCode @zeithq color scheme: - `curl | tar xvz -C ~/.vscode/extensions` - Restart VSCode, select `ZEIT` in `Preferences > Color Theme` - Send us feedback!
Tweet media one
13
26
170
@shuding_
Shu
2 years
SWR 2.0 Beta 4: Resource preloading API to kick off the request earlier, by @koba04 . Full changelog:
Tweet media one
3
11
167
@shuding_
Shu
4 years
Thank you @rauchg ! I didn’t mention it that much in public, but it was indeed one of the most tough times in my life. And it’s great to have the support from everyone @zeithq . We will make it through! 👋🦠🌞
@rauchg
Guillermo Rauch
4 years
Just heard from @zeithq engineer @shuding_ (who's in Wuhan!) about a *major* milestone: 0 new coronavirus cases yesterday in his district! 👋🦠🌞
4
27
460
11
2
166
@shuding_
Shu
1 month
The Next.js TypeScript plugin is quite helpful. However, there is no way to enable a TS Language Server plugin by default in VS Code. To avoid picking Workspace TS Version every time when opening a project, I made this extension to do it automatically:
@shuding_
Shu
2 months
This might be helpful:
5
5
136
10
12
165
@shuding_
Shu
2 years
One year ago, I switched to the Next.js team to work on React 18 and React Server Components support with @huozhi . Happy to see them landed and running as the core of Next.js 13 to empower some of these incredible new features.
@vercel
Vercel
2 years
Next.js 13 ◆ Layouts ◆ React Server Components w/ Streaming ◆ Component-based Data Fetching & Caching ◆ Turbopack: the Rust-based Webpack successor ◆ Improved `next/image` ◆ @next /font
42
444
2K
4
7
159
@shuding_
Shu
1 year
Satori () recently added: - tab & tab-size - line-clamp with ellipsis - clip-path - improved HSL syntax - improved radial-gradient & linear-gradient - multiple text-shadow Can’t thank enough to our contributors @LuQinYan , !
4
7
160