My 2023 Web Development Highlights
Tags: webdev, javascript, frontend, css
Published: 2023-12-27 21:53:35

Web technology is constantly evolving and new front end libraries and frameworks are constantly being released. New primitives, improved developer experience, and so many headless UI libraries. It’s hard to keep up sometimes. Let me make that easier for you by sharing my highlights from this year.

### CSS - :has selector

The Chrome Team has written a [beautiful blog post](https://developer.chrome.com/blog/css-wrapped-2023) that lists all the changes that CSS had this year. Go check it out and skim through it at least.

![CSS Wrapped 2023](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vo1114jn0jtsug6lctui.png)

What I (and everyone else) loved and would probably use the most is the new :has selector. You can now style the parent element based on some condition present in its child elements without JavaScript. For example, give it a background color if a child element is an input and has the :checked state.

![Tailwind Connect 2023 Keynote](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o17j8jhmrt1viaix6opd.png)

From [Tailwind Connect 2023 Keynote](https://www.youtube.com/watch?v=CLkxRnRQtDE&t=1209s)

Or as [Web Bae](https://twitter.com/WebIsBae) has demonstrated, create a [CSS-only dark mode toggle](https://twitter.com/WebIsBae/status/1737897643458597341).


![CSS-only dark mode toggle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggcld1tx0uk22w2kmuxi.gif)


I love when CSS adds features that usually required workarounds in JavaScript. Speaking of which…

### HTML - Exclusive Accordion

Sadly there’s no pretty blog post detailing all the changes to HTML like the CSS one had. In fact, I had a hard time figuring out when certain things were released. There is this [State of HTML 2023 Survey](https://survey.devographics.com/en-US/survey/state-of-html/2023/outline/1) that asks people about their familiarity with the newer features and changes. The survey is over and I recommend perusing it because I learned a lot.

For example, I did not know you make an accordion element by wrapping the <details> element around <summary> elements.

![Accordion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6n20p043rp62ni5wmtmy.png)

The survey has not been updated because it says no browser has implemented the exclusive accordion yet. But as of [Chrome 120, it is](https://developer.chrome.com/docs/css-ui/exclusive-accordion)! Just give the <details> the same name, and voila! The behavior that required JavaScript is now native to HTML.

![Exclusive Accordion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzss691otr9d6nhsud5t.png)

### JavaScript - new array methods

The [new ECMAScript 14](https://tc39.es/ecma262/2023/) came out this year and I would love to check it out but it kills my browser every time I try to load it. So instead I relied on reading blog posts about it. Please check them out:

- [Info World](https://www.infoworld.com/article/3703571/all-the-new-features-in-ecmascript-2023-es14.html)
- [The New Stack](https://thenewstack.io/the-new-javascript-features-coming-in-ecmascript-2023/)

The main highlight are new array methods. These include:

- findLast
- findLastIndex
- toReversed
- toSorted
- toSpliced
- with

The last 4 allow you to change array by copy, which follows the same behavior as .map and .filter, resulting in less confusion and also following functional programming patterns. And according to MDN, all these methods have already been implemented by browsers!

### Web APIs - View Transitions API

I’d describe Web APIs as a set of standardized features and behaviors that are implemented through a combination of HTML, CSS, JavaScript, and browser APIs. And [View Transitions API](https://developer.chrome.com/docs/web-platform/view-transitions) is a great example of that.

![View Transitions API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qpyp4avi6v0fggvs1oxi.gif)


This API allows you to seamlessly transition between [“different DOM states while also updating the DOM contents in a single step”](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API). Such behavior that would have required complicated and verbose CSS and JavaScript is now available in the DOM. Furthermore, the transitions can be controlled by JavaScript and CSS.

This API has been implemented by Chrome but is still being worked on by the W3C. Still, its current state is quite exciting already.

### UI Component Libraries - ShadCN

I wrote an [article about headless UI libraries](https://www.linkedin.com/pulse/accessibility-headless-ui-libraries-adobe-radix-tailwind-junsu-park/?trackingId=6Zg3KTLQSzmYcE5Dw4V2wA%3D%3D) so feel free to skim that to get up to date.

On Dec. 20th, React Aria has updated their [landing page](https://react-spectrum.adobe.com/react-aria/) for the [GA release of React Aria Components](https://react-spectrum.adobe.com/releases/2023-12-20.html), which is built on top of React Aria hooks. 

Also on Dec 20th, Lemon Squeezy released [Wedges](https://www.lemonsqueezy.com/wedges), which is built on [Radix UI](https://www.radix-ui.com/primitives) and [Tailwind](https://tailwindcss.com/).

Then on Dec 22nd, shadcn also updated [shadcn/ui](https://ui.shadcn.com/), adding the following [new components](https://ui.shadcn.com/docs/changelog):

- Drawer
- Carousel
- Pagination
- Toast
- Resizable

![shadcn/ui landing page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q0hm6djvz1bnwyztr3af.png)


Before, I was team React Aria. But as time went on, I have to say shadcn has outdone everyone. It has more components than the others and are very easy to use. The copy-paste approach that allows your codebase to own the component code instead of relying on an external package and have full control over it is really what won me over. And since copy-pasting manually is tiring, the CLI does all that work for you. And it works amazingly well. There’s a reason he was hired at Vercel.

I still have to try out Wedges, but for 2023, shadcn/ui was the clear winner. 

### Conclusion

So these were the highlights of 2023 for me. I need to take some time and tinker around with all these new features and updates to really solidify them in my head. 

I thought about writing about my highlight for UI framework (React, Svelte, Vue, Solid, etc) and metaframework (Next.js, SvelteKit, Nuxt, SolidStart, etc) but I need more time with all of them. Though two things stood out to me as they gained more adoption by these frameworks: **signals** and **server actions**. Once I have enough experience and wisdom (ie. read the opinions of people way smarter than me), I'll share mine.

All in all, I’m excited for what 2024 has to offer. Let me know what your highlights were!