Sign in

Haz

@haz.dev
3.1K followers 239 following 982 posts

Co-founder @ariakit.com. Ex Automattic, WordPress. Posts about Design, JS, CSS, a11y. Neurodivergent, dad.

PostsRepliesMedia
Haz @haz.dev · 18/09/2026
Yes, it's the best we have right now, at least for graphic design (not design in general). But getting a good result still takes a lot of iteration and specific guidance. For example, it generated this atrocious table of contents in one of my sessions:
Dark “On this page” navigation lists Centered, Split, With Form, and Minimal, with Centered highlighted in blue and marked by a blue segment on the vertical line to the left.
160
Haz @haz.dev · 08/09/2026
Another drawing my son made. How long did it take you to recognize the character?
210
Haz @haz.dev · 03/09/2026
My son made this drawing. He wants to know how many seconds it took you to figure out which character it is.
100
Haz @haz.dev · 02/09/2026
Colored badges that automatically adapt to any background color (CSS mix and relative color syntax). I'm back to UI design work this week. Inspiring posts incoming.
Four rounded panels labeled “Offset,” “Inverted,” “Brand,” and “Success” compare Plain, Brand, and Danger pill-button styles across dark gray, light gray, blue, and green backgrounds.
4291
Haz @haz.dev · 15/08/2026
The more I use other component libraries, the more convinced I am that Ariakit Components are necessary. We get so many details right, and the flexibility is unmatched.
Package statistics panel showing 1,157,131 weekly downloads with a rising purple trend chart, verified version 0.4.37, MIT license, last published 6 days ago, and four collaborator avatars.
131
Haz @haz.dev · 06/08/2026
Feels good, especially these days 🥲
GitHub pull request statistics showing 532 lines added and 1,636 lines removed, with a five-segment bar indicating substantially more deletions than additions.
020
Haz @haz.dev · 21/07/2026
Ariakit React just hit 1M weekly downloads on npm 🎉 We're just getting started. Launching something big in September/October.
Weekly Downloads metric showing 1,084,779 downloads, with a purple sparkline trending upward despite several dips.
042
Haz @haz.dev · 13/07/2026
I don't know if it's just me, but I often struggle with walls of text that lack code examples when trying to understand code decisions. That's why I use this custom instruction in ChatGPT. It really helps me follow its line of thinking during the session and in the final output.
A settings interface for Custom instructions prompting an AI to always include code examples.
361
Haz @haz.dev · 12/07/2026
We just removed .nvmrc from Ariakit and let pnpm manage Node.js too. If your project already uses pnpm, you may not need a separate Node version manager. Here’s the migration:
Terminal output showing the successful execution of the pnpm i command in the ariakit repository, adding node version 24.18.0
161
Haz @haz.dev · 02/06/2026
If you're using jsdom with Vitest, consider switching to happy-dom instead. It's much faster, but it comes with one caveat: its DOM spec coverage isn't as extensive as jsdom's. That's why I was using jsdom. But there's a better approach...
Console output comparison showing test duration dropping from 46.8 seconds with jsdom to 20.8 seconds with happy-dom
1171
Haz @haz.dev · 21/03/2026
I'm considering this for all my open-source projects. I prefer a detailed issue/discussion. I don't mind if it's AI-generated as long as it's valid and heads in the right direction. High-quality PRs from external contributors are much rarer, whether they're from humans or AI.
A dark mode settings panel showing pull request permissions set to Collaborators only.
340
Haz @haz.dev · 16/03/2026
That pose and outfit kind of remind me of this drawing I made 20 years ago haha.
A black and white pencil sketch of a young woman standing and hugging a dark electric guitar to her chest. She is dressed in a t-shirt reading LOVE ROCK under a fringed vest, plaid shorts, solid black tights, and ankle boots. A sketched, floating staircase curves behind her against a plain background.
010
Haz @haz.dev · 15/03/2026
Happy and sad in one image.
A code diff summary showing 22,830 lines added and 48,919 lines removed.
051
Haz @haz.dev · 28/02/2026
Tailwind autocomplete would be more useful if multiple related tokens were grouped under their parent token. It would make it much easier to discover and navigate between them.
Two screenshots of a code editor's autocomplete menu for the class bg-. The top image, marked with a red X, shows the menu cluttered with every individual shade of amber like bg-amber-50 and bg-amber-100. The bottom image, marked with a green check, shows a much cleaner menu where all amber shades are grouped into a single line like bg-amber-100, 200, allowing other background utilities to be easily visible.
3531
Haz @haz.dev · 26/02/2026
Last I checked it was considered fine to use @apply for the use case I’m describing:
A screenshot of a Twitter thread. The first tweet is from Adam Wathan on Jan 18, 2022. It reads: I think one of the biggest Tailwind anti-patterns I see pop up in GitHub issues all the time is trying to "extend" the behavior of an existing utility in some way, especially in combination with @apply. This output is correct but not what people doing this expect. Below this is an image showing two code blocks. The left is labeled Input and shows CSS classes like .my-page > div ~ .pointer-events-none, .profile-card, and .btn.outline-none using @apply with other utilities. The right is labeled Output and shows the resulting compiled CSS, which is unexpectedly long and repetitive.

The second tweet is a reply from Haz (@diegohaz). It reads: Here's my use case for @apply: I have to write an external CSS file (first image) because it's going to be compiled and shown to the users as vanilla CSS (second image). Before Tailwind, we were writing normal CSS, but the DX was not great. Tailwind has greatly improved it. Below this is an image showing two panels. The left shows a .combobox CSS class utilizing @apply with many Tailwind utilities. The right shows a UI preview of an input field labeled Your favorite fruit above a code block displaying the compiled, vanilla CSS output for .combobox.

The final tweet is a reply from Adam Wathan. It reads: Yeah and this is totally the type of use case I had in mind initially and I think something we would always want to support (thumbs up emoji). It's when people do the weird stuff I described above that it becomes this huge complicated mess of a maintenance burden I totally underestimated. The timestamp at the bottom is 10:09 PM, Jan 18, 2022.
000
Haz @haz.dev · 20/02/2026
There’s a way to achieve `inherit()` with container style queries, but it’s a bit complicated. You alternate between odd and even variables, use one, and set the other:
@container style(--_ak-layer-parent-parity: even) {
  --_ak-layer-parent-parity: odd;
  --_ak-layer-parent-odd: var(--ak-layer);
  --ak-layer-parent: var(--_ak-layer-parent-even);
}
@container style(--_ak-layer-parent-parity: odd) {
  --_ak-layer-parent-parity: even;
  --_ak-layer-parent-even: var(--ak-layer);
  --ak-layer-parent: var(--_ak-layer-parent-odd);
}
250
Haz @haz.dev · 18/02/2026
The fact that Vitest can run 1k tests in just 164 ms is mind-blowing.
Vitest console output showing 993 tests passed across 3 files
2562
Haz @haz.dev · 17/02/2026
A few use cases:
A dark-themed documentation interface for React Aria featuring a search bar and tab navigation. The "Components" tab is active, displaying a grid of cards for Autocomplete, Breadcrumbs, Button, Checkbox, CheckboxGroup, and ColorArea. The "Breadcrumbs" card is currently highlighted with a blue focus border.A dark-themed "Search pages" command palette interface. It features tabs for All, Guide, Components (selected), and Examples, each showing item counts. A list of components (Button, Checkbox, Combobox, etc.) is displayed below. The footer shows keyboard shortcuts for navigation and selection.A UI popup titled "Switch branches/tags" with a search bar prompting "Find or create a branch...". Two tabs are visible below: "Branches" (selected) and "Tags". The list currently shows the "main" branch, marked with a checkmark and a "default" badge.
010
Haz @haz.dev · 10/02/2026
Another interesting section:
A documentation page titled "7.2 Custom Helper Functions".
The text states: "Percentage parameters accept both string percentages ( '20%' ) and floating-point numbers between 0 and 1 ( 0.2 ). Both forms are equivalent."

A code block follows with comments and examples for four scenarios:
1. "color-mix() wrapper all equivalent": Demonstrates `css.bg.mix` syntax blending primary and white colors.
2. "Relative color syntax wrapper for lightening": Shows `css.bg.lighten` (noting a typo "ligthen" in some lines) producing an `oklch` color with `calc(l + 0.1)`.
3. "Relative color syntax wrapper for darkening": Shows `css.bg.darken` producing an `oklch` color with `calc(l - 0.1)`.
4. "Opacity modifier": Shows `css.bg.alpha` setting transparency, resulting in `oklch` output with `/ 50%`.
100
Haz @haz.dev · 10/02/2026
🤔 I can't stop thinking about this. Do we really want another CSS framework?
Screenshot of technical documentation regarding "5.5 Setting Variables (the set Mixin)". The text explains that variables are set via the "set" mixin plugin and supports two forms.

1. Namespace form (for config-defined variables):
Code examples show setting a namespaced variable like css.set.color.$primary("#000"), setting a top-level variable like css.set.$spacing("0.1em"), setting mid-chain like css.flex.col.set.color.$primary("#000"), and setting inside a wrapping mixin like css.dark(...).

2. Callable form (for any variable, including defineVar() variables):
Code examples show defining a custom variable with css.defineVar() and setting it mid-chain using css.flex.col.set(custom, "value"), as well as setting a config variable using the callable syntax css.set(css.vars.color.$primary, "#000").
340
Haz @haz.dev · 06/02/2026
Modern CSS capabilities.
A technical diagram comparing three ways to style element corners using CSS variables `--r: 12px` and `--gap: 4px`.
1. "Border Radius": Standard support across all major browsers using `border-radius: var(--r)`.
2. "Corner Shape": Uses `corner-start-end-shape: scoop` and `border-start-end-radius` calculation, shown with Chrome and Edge icons.
3. "Border Shape": Uses a complex custom `border-shape` definition (likely CSS Houdini/Paint API) with extensive geometry calculations for shoulders and arcs, indicated with a Chrome Canary icon.
2635
Haz @haz.dev · 05/02/2026
Some checkbox cards I’ve been working on.
2581
Haz @haz.dev · 03/02/2026
Yes, I made a few tweaks to the timing function:
390
Haz @haz.dev · 03/02/2026
This border-radius transition 🤌🏽 Believe it or not, it's just CSS.
921818
Haz @haz.dev · 02/02/2026
Concentric border radius
Infographic explaining concentric border radius formula: inner radius = parent radius - padding
1786
Haz @haz.dev · 01/02/2026
A drop shadow can make a big difference.
A visual comparison of two segmented toggle switches with "Profile" selected. The top version uses a flat white pill for the active state with no shadow, blending smoothly with the track. The bottom version adds a visible drop shadow to the white pill, giving it a lifted, floating appearance.
0812
Haz @haz.dev · 30/01/2026
CSS Anchors are truly amazing! I built this without any animation library. This is part of an upcoming component library I’ve been working on.
1773
Haz @haz.dev · 28/01/2026
The new corner-shape CSS property unlocks exciting new UI patterns. corner-shape: bevel round; border-radius: 1em 0 / 3em 0;
514414
Haz @haz.dev · 22/01/2026
A very simple button. Coming soon.
3130
Haz @haz.dev · 20/01/2026
I’m experimenting with a high-level, styled Button component API. Yes or no?
Diagram illustrating component composition for various button styles.
1.  Top Center: A simple "Button" rendered with `<Button>Button</Button>`.
2.  Top Left: A square button with a plus icon, using `<ButtonIcon>` and screen-reader text.
3.  Top Right: A white pill button "+ Follow back" using props `$bg="invert" $radius="round" $px="xl"`.
4.  Center Left: A badge-style button "Technology 43" with a computer icon and a count span.
5.  Bottom Left: A "Following" button with a checkmark icon using `$radius="round"`.
6.  Bottom Right: A large profile button for "Haz @diegohaz" demonstrating complex layout with `$orientation="vertical"`, `$rowSpan`, and nested content (image, label, description, icons).
1141
Haz @haz.dev · 19/01/2026
TIL you can show different images for light and dark modes in GitHub README files using HTML or Markdown:
Instructional diagram about adaptive images on GitHub.
- Method 1 (HTML): A code snippet using `<picture>` with `<source media="(prefers-color-scheme: light)" ...>` and a corresponding dark version.
- Method 2 (Markdown): Code snippet showing `![Logo](...#gh-dark-mode-only)` and `![Logo](...#gh-light-mode-only)`.
- Visual Output: Arrows point from the code to two versions of the "ariakit" logo—one optimized for a dark background (white text) and one for a light background (black text).
0253
Haz @haz.dev · 18/01/2026
Delete buttons 🗑️ Do you prefer red for the background color or the text color?
A 2x2 grid showcasing different designs for a "Delete" button. The top left shows a dark-mode ghost style with orange text. The top right is a light-mode outlined style with dark red text. The bottom left features a solid bright red button, while the bottom right shows a solid dark maroon button.
991
Haz @haz.dev · 17/01/2026
UI buttons
Collection of various UI button styles including primary, secondary, icon, and dropdown variants
0121
Haz @haz.dev · 16/01/2026
CSS 🤝🏽 Math How to get even margins without ignoring line-height.
Infographic titled "CSS 🤝 Math" demonstrating algorithmic design.
-  Top: A rendered "Technology" button with a white checkmark icon.
-  Bottom: An annotated version of the same button showing the underlying CSS logic.
   -  `--py: 0.875em` (vertical padding) is the single source of truth.
   -  `--px` (horizontal padding) is derived via: `calc(var(--py) + (1lh - 1cap)/2)`, where `1lh` is line-height and `1cap` is cap-height.
   -  The icon's size is set to `1lh`.
   -  The icon's right margin is adjusted with: `calc(var(--py) - var(--px))` to visually center the icon relative to the text and padding.
0281
Haz @haz.dev · 15/01/2026
Checkbox cards ✅
A UI kit display showing different states of a "Programming" choice chip. It includes unselected states with empty circular checkboxes, selected states with blue checkmarks and borders, variants with icons on the right, and different layout alignments (checkbox on left vs right).A UI mockup showing three variations of a selection card labeled "Programming." Each card contains a checkbox, a title, a description, and a small icon. The top card is unselected (dark grey). The middle card is selected (highlighted in blue with a checked box). The bottom card is disabled (content appears dimmed or faded).
0171
Haz @haz.dev · 14/01/2026
Design better badges 🎨
A step-by-step visual guide on styling a UI badge. It starts with a solid green "Success" badge, transitions to a blended dark background, highlights the text in green, adds a checkmark icon, and finally repositions the icon using "negative margin-inline-start" for better alignment.
0343
Haz @haz.dev · 13/01/2026
Design better buttons
A UI comparison showing two buttons with icons. On the left (marked with a green check), the icon is centered within the blue square highlight on the button's left side. On the right (marked with a red X), the icon is positioned awkwardly, not centered within the red square highlight area.
080
Haz @haz.dev · 08/01/2026
Almost there
Terminal output from a test runner (likely Vitest or Jest) showing successful results. "Test Files" shows 1 passed, "Tests" shows 735 passed. The run started at 19:08:16 and took a duration of 65ms.
060
Haz @haz.dev · 08/01/2026
I understand this point, but I also believe there’s real value, as an engineer, in deeply understanding someone else’s abstractions, especially in successful software. At the very least, it will help you build your own abstractions in the future.
Screenshot of a post by Dmitrii Kovanikov (@ChShersh). He writes about struggling to learn opinionated frameworks like Tailwind CSS, stating, "I can't force myself to learn 600 CSS classes someone just came up with. It's not fundamental knowledge." An attached image shows a code editor full of Tailwind classes alongside a preview of a music card titled "Class Warfare" by The Anti-Patterns.
350
Haz @haz.dev · 30/12/2025
I would be so much happier if this Tailwind syntax highlighting worked 😭
A code snippet of an anchor tag showing advanced syntax highlighting within the `class` attribute. Standard utilities like `relative` are blue. Modifiers such as `before:` and `hover:` appear in pink. Arbitrary values inside brackets, like `[-2px]`, are colored differently (yellow/orange) to distinguish them from standard class names.
171
Haz @haz.dev · 17/12/2025
Ariakit has hit 500k weekly downloads! Still a long way to go.
Weekly downloads chart showing 505,108 with an upward trend
0121
Haz @haz.dev · 04/12/2025
Use the standard Node.js "imports" field instead of TypeScript aliases:
A side‑by‑side code comparison showing migration from TypeScript path aliases to Node.js imports. On the left, tsconfig.json defines `"paths": { "@/ *": ["./ *"] }`, used as `import "@/foo"`. On the right, package.json defines `"imports": { "#app/ *": "./ *" }`, used as `import "#app/foo"`. Red arrows point from the TS config to the package.json config and from the old import style to the new one.
4704
Haz @haz.dev · 12/11/2025
Thank you thanks.dev for sponsoring Ariakit 😊
Screenshot of a GitHub Sponsors message with the Octocat logo and the headline “You have a new sponsor!” The line below says “@thnxdev is now sponsoring @ariakit for $219.00 one time!”
261
Haz @haz.dev · 21/10/2025
Kudos for being open-source! But "Fast" and "WebKit" don't go well together. Even Gecko is faster despite being behind on features.
Less noise, more browsing.
Ora is an open-source macOS browser built with Swift and WebKit. Fast, secure, and native Arc alternative that puts users first with smooth tab management, spaces, vertical sidebar, and many more.
130
Haz @haz.dev · 16/10/2025
🙏🏽
Ranked proposals card for “CSS @container style()” with move up/down controls
160
Haz @haz.dev · 14/10/2025
StackBlitz is stuck on this screen forever.
110
Haz @haz.dev · 08/10/2025
If you all stop using Firefox (or Zen) today, I can ship something really nice with container style queries tomorrow.
Dark‑mode “Can I use”‑style chart titled “CSS at‑rule: @container: Style queries for custom properties.” Global support shows 88.04%. Grid columns list Chrome, Edge, Safari, and Firefox with color‑coded version ranges: Chrome and Edge show support from 111+; Safari shows support from 18.x and also 26.x/TP; Firefox shows support from 144+. Earlier ranges are marked in red (unsupported).
230
Haz @haz.dev · 05/10/2025
The new @ariakit.org app will include styled examples with copy-paste code, AI prompts, and shadcn commands for both Ariakit React and React Aria. You should be free to choose the underlying component library for your app.
Dark‑mode split view of two documentation pages. Left: “Disclosure” for Ariakit React; right: “Disclosure (React Aria).” Each page has an intro sentence about using the Disclosure component to build collapsible content, a pill tag (“Ariakit React” or “React Aria”), and a “Basic Example” card showing an expanded disclosure titled “How do I get started?” with two paragraphs. Small action icons (preview eye, code, external) sit above the example on both sides.
1202
Haz @haz.dev · 03/10/2025
A sneak peek at the upcoming Ariakit examples
0121
Haz @haz.dev · 03/10/2025
Tooltips are an accessibility nightmare, but if you want to make them as accessible as possible, make sure users can move the cursor over them. Some magnifier tools use the cursor position. If the tooltip closes when the cursor moves away from the anchor, it will not work.
0132