Home/Frontend
Topic

Frontend

1,551 articles on Frontend.

11,834 articles
Frontend — Let's Bring Spacer GIFs Back!

Let's Bring Spacer GIFs Back!

The 90s web gave us many delightful things: web rings, guestbooks, “under construction” animations, and spacer GIFs. In this article, we'll see how I use a Spacer component to solve common layout problems, and why it's often a great tool for the job in the modern web.

JWJosh W. Comeau·January 11, 2021Frontend
Frontend — Styling Code In and Out of Blocks

Styling Code In and Out of Blocks

There is a <code> tag in HTML. I literally just used it to wrap that tag in the previous sentence — so meta. It is an inline-by-default element that

CCChris Coyier·January 6, 2021Frontend
Frontend — Whack-a-Mole: The CSS Edition

Whack-a-Mole: The CSS Edition

We’ve seen the checkbox hack and how it can be used to build a complete state machine in CSS. Today, we’ll take that line of thought a step further and build

WYWill YuWill Yu·January 6, 2021Frontend
Frontend — Custom Properties as State

Custom Properties as State

Here's a fun idea from James Stanley: a CSS file (that presumably updates daily) containing CSS custom properties for "seasonal" colors (e.g. spring is

CCChris Coyier·January 5, 2021Frontend
Frontend — Integrating TypeScript with Svelte

Integrating TypeScript with Svelte

Svelte is one of the newer JavaScript frameworks and it’s rapidly rising in popularity. It’s a template-based framework, but one which allows for arbitrary

ARAdam RackisAdam Rackis·December 24, 2020Frontend
Frontend — What’s Coming To VueX? — Smashing Magazine

What’s Coming To VueX? — Smashing Magazine

Vuex is the go-to state management library for Vue applications, and the Vue core team has some big plans to make it better than ever. Vuex 5 will work more like a composition API alternative but keeps all the benefits of using an official state management library. In this article, Joseph Zimmerman will take a look at what will be changing.

JZJoseph ZimmermanJoseph Zimmerman·December 24, 2020Frontend
Frontend — "Yes or No?"

"Yes or No?"

Sara Soueidan digs into this HTML/UX situation. "Yes" or "no" is a boolean situation. A checkbox represents this: it's either on or off (uh, mostly). But is a

CCChris Coyier·December 22, 2020Frontend
Frontend — Recognizing Constraints

Recognizing Constraints

There’s a “C” word in web development that we don’t give enough attention to. No, I’m not talking about “continuous integration”, or even “CSS”. The “C” word

JWJeremy Wagner·December 22, 2020Frontend
Frontend — Write Code, Get Confetti

Write Code, Get Confetti

This year I learned about the canvas-confetti npm package. It is a simple JavaScript package that injects a (virtual, <canvas>) confetti explosion into

FSFred Schott·December 16, 2020Frontend
Frontend — Co-experiences: Hanging out in the digital living room

Co-experiences: Hanging out in the digital living room

In the spring of 2019 — a full year before the COVID-19 pandemic caused the entire world to turn our living rooms into offices, schools, and gathering places — Mark Zuckerberg shared a plan to create the digital equivalent of the living room, where people could connect and hang out together. That work was already underway early […]

MEMeta Engineering·December 16, 2020Frontend
Frontend — Creating a React Analytics Logging Library

Creating a React Analytics Logging Library

In the first installment of the article, we examined why we built a React analytics library. We also looked at how we use the library to share data efficiently, log smarter impressions, and simplify event logging. In this second part of the article, we will focus on how we abstracted the library for use by…

FCFabio Canache·December 16, 2020Frontend
Frontend — Hell Yes! CSS!

Hell Yes! CSS!

Speaking of cool CSS stuff you can buy, Julia Evans' zine Hell Yes! CSS! is hot off the presses. A "zine" being 28 pages of "short, informative, and fun

CCChris Coyier·December 15, 2020Frontend
Frontend — Give Users Control: The Media Session API

Give Users Control: The Media Session API

Here’s a scenario. You start a banging Kendrick Lamar track in one of your many open browser tabs. You’re loving it, but someone walks into your space and you

IUIdorenyin UdohIdorenyin Udoh·December 14, 2020Frontend
Frontend — How Redux Reducers Work — Smashing Magazine

How Redux Reducers Work — Smashing Magazine

If you have used Redux at any point while developing an application to manage `state`, you will most definitely have come across reducers. In this tutorial, Fortune Ikechi will show you the concept of reducers and how they work, specifically in React applications. In order to understand and better use Redux, a solid understanding of reducers is essential. Reducers provide a way to update an applic

FIFortune Ikechi·December 14, 2020Frontend
Frontend — npm ruin dev

npm ruin dev

In 2020, I rediscovered the enjoyment of building a website with plain ol’ HTML, CSS, and JavaScript — no transpilin’, no compilin’, no build tools other than

JKJeremy KeithJeremy Keith·December 9, 2020Frontend
Frontend — TypeScript & Relevance

TypeScript & Relevance

In our wide world of building for the web, we have every opportunity to talk about tools. We lunge to fill every gap we find in our projects with a definitive

JAJake Albaugh·December 8, 2020Frontend
Frontend — Very Extremely Practical CSS Art

Very Extremely Practical CSS Art

I've always enjoyed the CSS art people create, but I’ve never ventured into it much myself. I'm familiar with many of the tricks involved, but still find it

MSMiriam Suzanne·December 8, 2020Frontend
Frontend — How To Use MDX Stored In Sanity In A Next.js Website — Smashing Magazine

How To Use MDX Stored In Sanity In A Next.js Website — Smashing Magazine

MDX gives you the minimalist ergonomics of Markdown with the flexibility of custom components. By combining MDX with Sanity and Next, you can build robust, team-friendly content editing experiences while keeping the pleasant and efficient developer experience of building Jamstack sites with React.

JLJason LengstorfJason Lengstorf·December 7, 2020Frontend
Frontend — CommonMark: A Formal Specification For Markdown — Smashing Magazine

CommonMark: A Formal Specification For Markdown — Smashing Magazine

Markdown is a powerful markup language that allows editing and formatting in plain text format that can then be parsed and rendered as HTML. It has a declarative syntax that is both powerful and easy to learn for technical and non-technical folks. However, due to the consequential ambiguities in its original specification, there have been a number of distinct [flavors (or custom versions)](https:/

AAAdebiyi AdedotunAdebiyi Adedotun·December 3, 2020Frontend
Frontend — Native CSS Masonry Layout In CSS Grid

Native CSS Masonry Layout In CSS Grid

Rachel Andrew introducing the fact that masonry layout is going to be a thing in native CSS via CSS grid layout. The thing with masonry is that we can already

CCChris Coyier·November 30, 2020Frontend
Frontend — Super Tiny Icons

Super Tiny Icons

A bunch of SVG icons (of popular things) all under 1KB. SVG is awesome for golfing.

CCChris Coyier·November 30, 2020Frontend
Frontend — Testing Vue Applications With The Vue Testing Library — Smashing Magazine

Testing Vue Applications With The Vue Testing Library — Smashing Magazine

The Vue Testing library can help you to test your applications by mirroring the way that a user would interact with them. Here’s everything you need to know if you want to get started right away. In this article, Kelvin Omereshone will look at testing Vue applications using the Vue Testing Library — a lightweight library that emphasizes testing your front-end application from the user’s perspectiv

KOKelvin OmereshoneKelvin Omereshone·November 24, 2020Frontend
Frontend — Creating UI Components in SVG

Creating UI Components in SVG

I’m thoroughly convinced that SVG unlocks a whole entire world of building interfaces on the web. It might seem daunting to learn SVG at first, but you have a

SDSarah DrasnerSarah Drasner·November 23, 2020Frontend
Frontend — Graphery SVG

Graphery SVG

I've compared SVG and Canvas before. If you're trying to decide between them, read that. I'd say the #1 difference between them is vector (SVG) versus raster

CCChris Coyier·November 23, 2020Frontend
Frontend — Boop!

Boop!

An in-depth tutorial that teaches how to create one of the most adorable interactions I've ever created. We'll learn how to use React components and hooks to abstract behaviours, and see how to design the perfect API. Even if you're not into animations, I think you'll find it interesting!

JWJosh W. Comeau·November 23, 2020Frontend
Frontend — A Comparison Of async/await Versus then/catch — Smashing Magazine

A Comparison Of async/await Versus then/catch — Smashing Magazine

In JavaScript, there are two main ways to handle asynchronous code: then/catch (ES6) and async/await (ES7). These syntaxes give us the same underlying functionality, but they affect readability and scope in different ways. In this article, Bret Cameron will show you how one syntax lends itself to maintainable code, while the other puts us on the road to callback hell!

BCBret CameronBret Cameron·November 23, 2020Frontend
Frontend — A Thoughtful Way To Use React’s useRef() Hook — Smashing Magazine

A Thoughtful Way To Use React’s useRef() Hook — Smashing Magazine

In a React component, `useState` and `useReducer` can cause your component to re-render each time there is a call to the update functions. In this article, you will find out how to use the `useRef()` hook to keep track of variables without causing re-renders, and how to enforce the re-rendering of React Components.

AIAleem IsiakaAleem Isiaka·November 19, 2020Frontend
Frontend — Thinking Outside the Box with CSS Grid

Thinking Outside the Box with CSS Grid

Great tutorial from Alex Trost (based on some demos, like this one, from Andy Barefoot) showcasing how, while CSS grid has straight grid lines across and

CCChris Coyier·November 18, 2020Frontend
Frontend — Standardizing Select And Beyond: The Past, Present And Future Of Native HTML Form Controls — Smashing Magazine

Standardizing Select And Beyond: The Past, Present And Future Of Native HTML Form Controls — Smashing Magazine

Working with native HTML Form Controls has been such a pain point for web developers, from styling to extending them, the limitations are so great that countless dev hours have been spent recreating them. But why are form controls so difficult to work with? In this article, Stephanie dives into the past by going back to the beginning of HTML and tracing the evolution of form controls through to th

SSStephanie StimacStephanie Stimac·November 18, 2020Frontend
Frontend — Copyediting with Semantic HTML

Copyediting with Semantic HTML

Tracking changes is a quintessential copyediting feature for comparing versions of content. While we’re used to tracking changes in a word processing

JRJohn RheaJohn Rhea·November 17, 2020Frontend
Frontend — Jetpack Backup

Jetpack Backup

It's no secret that CSS-Tricks is a WordPress site. And as such, we like to keep things WordPress-y, like enabling the block editor and creating some custom

GGGeoff GrahamGeoff Graham·November 17, 2020Frontend
Frontend — CSS Background Patterns

CSS Background Patterns

Nice little tool from Jim Raptis: CSS Background Patterns. A bunch of easy-to-customize and copy-and-paste backgrounds that use hard stop CSS gradients to

CCChris Coyier·November 16, 2020Frontend
Frontend — What’s New In Vue 3? — Smashing Magazine

What’s New In Vue 3? — Smashing Magazine

Vue 3 comes with a lot of interesting new features and changes to some of the existing ones that are aimed at making development with the framework a lot easier and maintainable. In this article, we’re going to take a look at some of these new features and how to get started with them. We’re also going be taking a look at some of the changes done to the existing features.

TOTimi OmoyeniTimi Omoyeni·November 13, 2020Frontend
Frontend — Libraries for SVG Drawing Animations

Libraries for SVG Drawing Animations

In 2013, Jake Archibald introduced this cool trick of animating an SVG path to look like it’s drawing itself. It’s 2020 now, and the trick is still popular.

LILinda IkechukwuLinda Ikechukwu·November 11, 2020Frontend
Frontend — ARIA in CSS

ARIA in CSS

Jeremey reacting to Sara's tweet, about using selectors instead of classes when the styling you are applying is directly related to the ARIA state.

CCChris Coyier·November 10, 2020Frontend
Frontend — JavaScript Operator Lookup

JavaScript Operator Lookup

Okay, this is extremely neat: Josh Comeau made this great site called Operator Lookup that explains how JavaScript operators work. There are some code

RRRobin RendleRobin Rendle·November 9, 2020Frontend
Frontend — A Dive Into React And Three.js Using react-three-fiber — Smashing Magazine

A Dive Into React And Three.js Using react-three-fiber — Smashing Magazine

`react-three-fiber` is a powerful Three.js renderer that helps render 3D models and animations for React and its native applications. Today, Fortune Ikechi is going to show you how to configure and use react-three-fiber for building and displaying 3D models and animations in React and React Native applications. By building our 3D ludo dice box, you’ll learn about the basics of Three.js alongside i

FIFortune Ikechi·November 9, 2020Frontend
Frontend — Quick LocalStorage Usage in Vue

Quick LocalStorage Usage in Vue

localStorage can be an incredibly useful tool in creating experiences for applications, extensions, documentation, and a variety of use cases. I've personally

SDSarah DrasnerSarah Drasner·November 5, 2020Frontend