StackBlitz Profile Banner
StackBlitz Profile
StackBlitz

@stackblitz

31,064
Followers
27
Following
382
Media
2,810
Statuses

How frontend & design systems teams collaborate. ⚡️ 🧰 🆕

Joined January 2014
Don't wanna be here? Send us removal request.
Pinned Tweet
@stackblitz
StackBlitz
3 months
📣 Announcing: 🔋 StackBlitz Self-Hosted! 🔋 Integrate it with your internal systems and scale productivity without hiking hosting costs! Now you can finally bring secure, fast, in-browser web development environments to your enterprise, on prem!
Tweet media one
4
19
111
@stackblitz
StackBlitz
3 years
Today we’re excited to bring Node.js back to its roots - the browser! Together with @googlechrome and @vercel , we're enabling a new type of development and debugging experience that was not possible before: 🧵
169
2K
6K
@stackblitz
StackBlitz
10 months
🎨 CSS tip(3): `height: 100vh` is a common way to make your app fit the whole window. It won't do a good job on mobile though 😬 `height: 100dvh` works way better! 📱 See the difference on your phone: 💻 Play with the demo:
39
482
3K
@stackblitz
StackBlitz
3 years
#CSS tip (8): You can implement a snap effect for scrollable content on your site with just 2 lines of CSS! 1️⃣ `scroll-snap-type` on parent 2️⃣ `scroll-snap-align` on children 💻 Play with the code:
20
384
2K
@stackblitz
StackBlitz
3 years
#CSS tip (5): Using a blur filter you can create a very nice backlight (or a "smart shadow") effect for your images. In a pseudo-element: 1⃣ `inherit` a background 2⃣ blur it 3⃣ put it behind the main element using z-index 💻 Play with the code:
23
297
2K
@stackblitz
StackBlitz
1 year
Today, after years of battle testing by millions of developers, in collaboration with browser vendors: WebContainer API is now available to everyone. Start building the next generation of interactive coding experiences at ❤️🧵
55
387
2K
@stackblitz
StackBlitz
3 years
Introducing The fastest way to start with Node.js!
14
337
2K
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (11): When dealing with numeric inputs – such as number, range, or date – you can use the `.valueAsNumber` property to get an actual number instead of a string (that the `.value` returns.)
16
309
1K
@stackblitz
StackBlitz
2 years
A suddenly-appearing scrollbar can shift a layout… but now you can use `scrollbar-gutter: stable` to mitigate that! 😍 💻 You can play with the demo here: 📘 Read the MDN docs: 🌐 Browser support: Chrome, Edge, Firefox [1/2]
12
236
1K
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (4): Remove duplicates from an array using Set:
12
208
1K
@stackblitz
StackBlitz
6 months
Argh, a scrollbar shows and the whole page shifts! We've all seen that, right? 😅 You might know that `overflow-y: scroll` mitigates the issue by showing scrollbar all the time. But now there's a more elegant solution: `scrollbar-gutter: stable` just reserves the space!
10
114
986
@stackblitz
StackBlitz
3 years
Vite is *extremely* fast! And now is the fastest way to start building with it! ❤️
13
141
925
@stackblitz
StackBlitz
3 years
🤯 Browsers are awesome!: With `MediaDevices.getDisplayMedia()` you can capture the contents of a chosen app, a browser tab, or a full screen:
8
225
916
@stackblitz
StackBlitz
3 years
#CSS tip (3): CSS is all you need to trim your multiline text to a specific number of lines 🤯 (supported in every browser but the good old IE!)
9
198
907
@stackblitz
StackBlitz
2 years
📢 Announcing: WebContainers are now officially supported in Firefox, desktop & mobile! You can now build Node.js apps directly in the browser using @Firefox and debug them natively with @FirefoxDevTools 🔥 > Use the Web to Build the Web! <
24
236
864
@stackblitz
StackBlitz
3 years
#CSS tip (9): Sometimes instead of degrees it's more convenient to use the `turn` unit!
6
172
835
@stackblitz
StackBlitz
4 years
💡 Optimization tip (3): By adding the `defer` attribute to your `<script>` tag, you make that JavaScript run only _after_ the DOM is loaded, so it doesn't delay displaying the page itself. Is there an actual difference? Let's see:
8
177
813
@stackblitz
StackBlitz
3 years
The Node.js runtime itself is running natively, inside the browser, for the first time ever: (Note: this environment *is not* running on a remote server!)
7
134
805
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (3): If you need an array of a given length (and with 0 to N values), here's a short way to create one:
13
145
769
@stackblitz
StackBlitz
4 years
💡 UX improvement tip (2): By setting `scroll-behavior` in your CSS to `smooth`, you can help users notice scrolling happened. ⚠️ Remember about those who prefer reduced motion though! (see end of the video)
8
141
763
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (9): With a *getter*, you can add a computed property to your objects! (and classes)
12
141
744
@stackblitz
StackBlitz
3 years
#CSS tip (2): `place-items` is a shorthand property that allows you to e.g. center what's inside a `grid` container. Super useful if you're confused about `align-items`, `align-content`, `justify-content`, `justify-items`… and all you wanted was just to center stuff 😁
11
135
737
@stackblitz
StackBlitz
1 year
Big news: WebContainers are now supported on Safari, iOS and iPadOS! 🤳🎉
19
173
735
@stackblitz
StackBlitz
3 years
#CSS tip (7): Make your quotes look more sophisticated by using the `quotes` property to set up the “smart quotes”:
5
104
711
@stackblitz
StackBlitz
4 years
What HTML element do you feel is still not used enough these days? How about `<details>` - for doing this common "show more" feature in a nice semantic way, and with no JavaScript needed? #useThePlatform 💪
21
166
707
@stackblitz
StackBlitz
5 months
JavaScript was created in 10 days, and announced to the world 28 years ago today 🥳 Happy birthday, JavaScript! may you never cease to amaze us 🥹
7
94
708
@stackblitz
StackBlitz
3 years
Browsers are awesome! (4): `window.showOpenFilePicker()` allows you to read from, and write to local files! 🤯 So.. how about we use an online code editor to build an online text editor? 😁 Let's start with file syncing:
8
158
672
@stackblitz
StackBlitz
3 years
💡 Forms tip! (3) Use `<datalist>` to enhance your forms with suggested values – not only for text inputs, but also 🧮 numbers, 📏 ranges, ✉️ emails, and even 🚦 colors! #useThePlatform
4
147
661
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (12): If you only want to handle an event once, you can configure this with the 3rd argument to the `addEventListener` method: `{ once: true }`
2
120
643
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (8): When you set an `id` to an HTML element it... becomes a global JavaScript variable referencing that element 🤯
18
110
635
@stackblitz
StackBlitz
3 years
💡 Node.js tip (6) You can use React to render things to... terminal – using Ink! Great tool for building beautiful CLIs!
9
109
624
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (7): `Array.includes` is useful in removing repeat logic. Instead of: "if A is this, or A is that, or A is that, or that" ... you're writing: "if A is among these values"
8
128
614
@stackblitz
StackBlitz
3 years
#CSS tip (10): Use `:focus-within` to put more visual emphasis on the part of a form that has a currently focused element. 💻 Play with the code:
8
118
599
@stackblitz
StackBlitz
3 years
💡 JavaScript i18n / l10n tip (4): Have some items to display in a human-readable way? Instead of writing custom logic, use `Intl.ListFormat`:
8
106
573
@stackblitz
StackBlitz
4 months
CSS tip: Are your numbers jumpy? That's because each digit can have a different width. This causes issues ranging from an unpleasant visual effect in a counter component to layout shifts in your UI 😬 To fix this, use `font-variant-numeric` and `font-feature-setting`:
3
83
579
@stackblitz
StackBlitz
3 years
💡 Forms tip! (5) `autocomplete="one-time-code"` can help users auto-fill the auth code they've just received - they won't need to copy it from the SMS by hand!
2
99
577
@stackblitz
StackBlitz
3 years
💡 TypeScript tip (4): Keeping your objects immutable is often important for - performance (e.g. Redux or `onPush` in @Angular ) - and sane logic (e.g. don't wanna mutate default values) You can make your object read-only (nested!) by adding `as const` assertion:
13
107
567
@stackblitz
StackBlitz
3 years
💡 JavaScript tip: When destructuring multiple values you can set one as a default for another.
5
108
555
@stackblitz
StackBlitz
3 years
🤯 Browsers are awesome! (2): With `BarcodeDetector` you decode linear and two-dimensional (e.g. QR Code) codes directly in a browser!
6
123
538
@stackblitz
StackBlitz
3 years
#HTML tip (3): When working with ordered lists, you can use the `reversed` and `start` attributes! 💡 Perfect for counting down and pagination! (💻 demo: )
4
98
539
@stackblitz
StackBlitz
3 years
💡 Node.js tip (5) Use the `jsome` package to make JSON output more readable:
13
91
544
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (10): ☑ You can set a checkbox to `checked` state via JavaScript or with an HTML attribute. But... 🤷 You can also set it to an `indeterminate` state – with JavaScript only. Useful e.g. when you have an option with sub-options that are partly selected.
4
86
504
@stackblitz
StackBlitz
3 years
💡 JavaScript i18n / l10n tip (3): `Intl` is a powerful API (supported by all modern browsers) that helps to deal with all things languages-related – no external lib necessary! Here's how to use `Intl.RelativeTimeFormat()` to display relative time: #useThePlatform
2
121
514
@stackblitz
StackBlitz
3 years
To open code from GitHub, just add "blitz" to the domain name (`...` becomes `...`) You can even do that for specific branches!
@sulco
Tomek Sułkowski
3 years
This popped up on my timeline, so decided to give it a go and run @debs_obrien 's Nuxt Content tutorial in a web container. A minute later it's up and running! ♥️ ... and we don't officially support @nuxt_js yet 😃 My Vue friends will be so happy! ☺️
1
11
70
6
142
512
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (13): If you want to test something quickly in your browser's console and you need `document.querySelectorAll` for it, DevTools provide a handy `$$` function – just for that.
5
122
503
@stackblitz
StackBlitz
3 years
#CSS tip: `text-decoration` doesn't have to mean a solid line: You can make it dotted, dashed, double, or even wavy! And even change its color & thickness too! (Useful e.g. for making your texts pop visually without making them look like links)
7
76
491
@stackblitz
StackBlitz
3 years
`<two-up>` is a custom element you can use to add a visual comparison feature to any website/app: 1⃣ `import 'two-up-element'` (or use a cdn link) 2⃣ use `<two-up>` around any two HTML elements 3⃣ that's it, enjoy! Web Components are awesome! #useThePlatform
10
95
485
@stackblitz
StackBlitz
2 years
Introducing: StackBlitz Codeflow! ♾ Codeflow is a one-click GitHub integration that keeps you in flow state by seamlessly weaving together: - creating & reviewing pull requests - fixing issues - contributing to open-source repositories in a way that wasn't possible before: 🧵
26
115
481
@stackblitz
StackBlitz
4 months
💡 DevTools tip: You can make your console.log stand out by adding some CSS to it! 🎨
5
71
476
@stackblitz
StackBlitz
3 years
#CSS tip (4): 🖨️ Links don't make any sense when a page is printed out. (we tried tapping, even double-tapping the paper... nothing!😮) You can make them way more informative though: 💡 Use `content: attr(href)` to automatically add links' addresses in the print stylesheet.
4
89
471
@stackblitz
StackBlitz
2 years
CSS is awesome: You can implement a snap effect with just 2 CSS properties! 1️⃣ `scroll-snap-type` on parent 2️⃣ `scroll-snap-align` on children 💻 Play with the code: 📘 Read the MDN docs: 🌐 Browser support: full!:)
7
95
465
@stackblitz
StackBlitz
3 years
#HTML Tip (2): <dialog> is the web's modal. Includes the open attribute, ::backdrop pseudo-element and a native way to close with <form method="dialog">. ⚡️ Combine with <details>, <summary>, and a little JS to make a nice semantic modal without CSS.
6
82
460
@stackblitz
StackBlitz
2 months
Vertical centering for `display: block` is coming to a browser near you! `align-content: center` is now supported in Chrome 123, Safari 17.4 beta, and in development in Firefox 🥳
8
59
441
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (6): Have you ever written `v => console.log(v)` to quickly find out what comes in a callback? There's a more convenient way: Just use `console.log` directly! (it's not only less typing, but also "automatically" gets all the params, if there's more than one)
9
89
420
@stackblitz
StackBlitz
4 years
💡 Optimization tip (2): The HTML `<picture>` element allows us to provide images in several formats, and because it has a fallback mechanism built-in, each browser displays only the source it supports. Like here: Chrome gets .avif, Firefox – .webp (& guess who'll get .jpg 😉)
3
101
426
@stackblitz
StackBlitz
3 years
💡 Forms tip! (9) `:focus-within` pseudoclass allows to style a container that contains a focused element. You can use it to e.g. put more emphasis on a fieldset a user is filling at a certain moment.
2
109
419
@stackblitz
StackBlitz
2 years
Our team is obsessed with speed, so when we've heard the latest @Vite_js 2.9 significantly optimizes cold start (+more!), we had to put it to the test. Well… wow 🤯
8
53
418
@stackblitz
StackBlitz
3 years
💡 TypeScript tip (7): Using the built-in `Partial<T>` you can create a new type with all the properties of your base type (<T>) set to optional – useful for update logic and writing tests. The opposite is `Required<T>`, which makes all the properties, well, required 😀
2
75
412
@stackblitz
StackBlitz
3 years
So, you can now build your next slide deck with code... but with no need for any manual setup, or even leaving the browser! Just open a new tab, type , and jump in to focus on your presentation 😍
6
86
406
@stackblitz
StackBlitz
3 years
💡 Need an instant backend for your demo, prototype or workshop? With `json-server` ( @typicode ♥️) you can have a REST API in literally 5 seconds! You get GET, POST, DELETE, pagination, sorting, full-text search, and others out of the box 🤯 (+ it works great in WebContainers!)
6
89
400
@stackblitz
StackBlitz
3 years
💡 Forms tip! (10) As most JavaScript developers quickly learn, values read from `<input type="number">` are actually... strings! – which leads to some funky results when using them in math operations. But if you use `.valueAsNumber` instead – you get actual JavaScript numbers!
8
66
383
@stackblitz
StackBlitz
3 years
💡 JavaScript tip (2): When dealing with big numbers in JS, instead of typing a bunch of zeros, you can use either: - scientific notation (e.g. 10e6) or - numeric separator (e.g. 10_000_000)
2
90
378
@stackblitz
StackBlitz
2 years
`aspect-ratio` is now supported by all major browsers! 🤩 💻 You can play with this demo here: 📘 Read the MDN docs: 🌐 Browser support: Edge, Chrome, Firefox, Safari, Android Browser… pretty much everything but the IE;)
2
71
386
@stackblitz
StackBlitz
6 years
Say hello to the awesome v6 release of @Angular on StackBlitz! 👋 😍
Tweet media one
6
127
367
@stackblitz
StackBlitz
3 years
💡 Forms tip! (2) You *can* customize these native html validation messages that browsers display. Just use the `setCustomValidity` method! Super useful for working with pattern validation, or even just to say "Name is required" ;) #useThePlatform
3
72
363
@stackblitz
StackBlitz
2 years
Here's a different kind of CSS grid ;) Use `repeating-linear-gradient` background image to draw it!
3
54
362
@stackblitz
StackBlitz
3 years
#HTML Tip: 💬 Build a video chat using Web RTC and the MediaCapture/Streams APIs. 🔎 First step: capturing video through the MediaCapture API using navigator.mediaDevices.getUserMedia and the <video> tag. 🤳 Now the user can see how others see them!
3
56
357
@stackblitz
StackBlitz
8 months
From to live dev server in <5s 🤯 Fantastic work @nextjs team!
@vercel
Vercel
8 months
Next.js 13.5 ◆ 22% faster local server startup ◆ 29% faster HMR (Fast Refresh) ◆ 40% less memory usage ◆ Optimized package imports ◆ `next/image` improvements ◆ And over 438 bugs patched!
138
759
5K
4
42
356
@stackblitz
StackBlitz
3 years
We've just realized we have a powerful Node.js REPL on our hands 🤯 So now, if you want to do some instant-feedback-loop work with Node, just type 🕺
4
87
349
@stackblitz
StackBlitz
2 months
Did you know that Prettier can organize your CSS declarations so they're always in a nice, logical order? 💡 `prettier-plugin-css-order`:
5
58
348
@stackblitz
StackBlitz
3 years
💡 Forms tip! (4) The `<fieldset>` element – used for grouping relevant inputs & buttons – allows you to provide the `disabled` attribute if you want to disable these enclosed controls all at once. #useThePlatform
3
72
346
@stackblitz
StackBlitz
4 years
🎉 Today Vue 3.0 was released – and here’s the fastest way for you to give it a whirl! ⚡️️
4
79
333
@stackblitz
StackBlitz
3 years
💡 TypeScript tip (8): If you want to make sure no-one mutates your array, make it `readonly`:
2
44
331
@stackblitz
StackBlitz
7 months
The perfect keynote intro doesn't exi-
4
30
331
@stackblitz
StackBlitz
6 months
Current status: In love with the new @Angular tutorial! Just open a page, code and learn. No setup. No stress. Just play. 🥹
4
56
323
@stackblitz
StackBlitz
3 years
💡 JavaScript i18n / l10n tip (5): Adding suffixes to ordinal numbers ("1st, 14th, ...") used to require lots of error-prone custom logic (specific for each locale!) Nowadays you can use `Intl.PluralRules` instead:
5
62
314
@stackblitz
StackBlitz
3 years
📢 Today we've added quick access to *dozens* of new OSS projects! You can now play with: <takes a breath> all the official @vite_js templates, @nestframework , @eleven_ty , @docusaurus , @Slidevjs , @UseExpressJS , @astrodotbuild , and more! ❤️
5
56
313
@stackblitz
StackBlitz
3 years
📢 Announcing: *Nuxt support on StackBlitz!* 🎉 We are thrilled to have worked with @Nuxt_js to bring you *the fastest way* to start your next awesome @vuejs application – right in your browser! Can't wait to see what you'll build with it!
8
52
313
@stackblitz
StackBlitz
3 years
💡 Node tip (7) You can use `npm-check` to see – and interactively update – outdated npm dependencies in your project:
6
57
313
@stackblitz
StackBlitz
1 year
Want to play with Node.js but not spend more than 5 seconds setting up the environment? Type in: - and start editing! (no sign-in required, too!)
5
50
309
@stackblitz
StackBlitz
3 years
#CSS tip (6): ❄ Using a backdrop-filter, you can create a frosted glass effect (as seen in many native apps). It adds a layer of depth and is a really nice touch to a design. 💅
3
75
303
@stackblitz
StackBlitz
10 months
🎨 CSS tip(4): `:has` selector allows you to select a parent of a given element… … but it can also select a sibling that appears BEFORE a specific condition! 🤯 💻 Play with the demo:
3
47
304
@stackblitz
StackBlitz
3 years
💡 Forms tip! (7) Working with date inputs use the `valueAsDate` property so you don't have to manually convert between "YYYY-MM-DD" string and a `Date` object. ℹ️ Useful for both getting, and settings the value!
3
70
301
@stackblitz
StackBlitz
3 years
💡 JavaScript i18n / l10n tip (2): Use `.toLocaleString()` method to display dates in language-specific format. You can also set additional options such as timezone or 12- vs 24-hour format. No external lib necessary! #useThePlatform
2
60
296
@stackblitz
StackBlitz
3 years
💡 TypeScript tip (5): The `keyof` operator extracts the keys of a given type, which makes it extremely useful for all kinds of logic that's based on properties of an object – like sorting, filtering, etc. 💡 Combine it with a generic type to make it more universal!
2
61
291
@stackblitz
StackBlitz
3 years
Unlike remote virtual machines, WebContainers run directly in your browser, so they work even when your connection drops!
3
33
291
@stackblitz
StackBlitz
15 days
When immutably updating a JavaScript array, you can now use `.with` instead of the spread syntax 💡 (supported by all browsers!)
3
40
293
@stackblitz
StackBlitz
3 years
Browsers are awesome! (3): `<input type="file">` permits a user to select only a single file at a time... but that's only its default behavior! You can also allow selecting multiple files, and even specify the supported file types! Just add `multiple` and `accept` attributes:
2
63
287
@stackblitz
StackBlitz
3 years
That was fast! You can now try Nuxt 3 Beta, powered by @vite_js , entirely inside your browser 🎉 Thanks @Atinux & @nuxt_js team for making this happen so quickly! Try it out 👉
4
39
287
@stackblitz
StackBlitz
4 years
Need the "[n] hours ago" info on your page? 1⃣ - add the `<relative-time>` element 2⃣ - and the script tag ... done! GitHub's `time-elements` need way more recognition! 😍 (see it in action: )
4
67
283
@stackblitz
StackBlitz
5 months
💡 JS tip: `.toSorted` returns a new array instead of mutating it. Really convenient, and supported in all browsers, too!
3
43
277
@stackblitz
StackBlitz
3 years
💡 Forms tip! Use the built-in `.validationMessage` property that allows you to get a native validation message (in your user's locale!), and display it in the UI the way you like it. Way less hardcoded logic too! #useThePlatform
1
59
278
@stackblitz
StackBlitz
2 years
📣 A little surprise for the @Sveltejs community ahead of #SvelteSummit : We're excited to announce the official support for SvelteKit in WebContainers!
5
51
275
@stackblitz
StackBlitz
3 years
TIL: you can define the caret color in CSS! What’s the last CSS property that made you say: whoa is this a thing 😲?
3
39
271
@stackblitz
StackBlitz
3 years
💡 TypeScript tip: TypeScript infers array's type as an Array of the union of included types... which may not be precise enough. If you want this value to be inferred as a Tuple instead, add `as const`
3
51
264
@stackblitz
StackBlitz
3 years
#CSS tip (11): The hexadecimal color notation allows specifying the "alpha" value too! (So if you're already using #-hex format there's no need to change it just to add a little transparency 🙂)
4
58
260
@stackblitz
StackBlitz
4 years
💡 UX improvement idea: By changing input type from `text` to `search` you allow your users to quickly clear the value – which can be really useful for all kinds of search or filter elements. demo: (browser support is stellar btw! 💪 #UseThePlatform )
5
51
259
@stackblitz
StackBlitz
3 years
💡 i18n / l10n tip: You can use `Intl.NumberFormat` to conveniently format numbers – including currencies! – to a chosen locale:
3
48
251
@stackblitz
StackBlitz
3 years
💡 JavaScript i18n / l10n tip (6*): Working with different units can be confusing! `Intl.Units` object helps make sense of different systems of measurements – including the exotic ones:
4
44
247