ProductsAboutBlog

How to build a Figma design system component using Shadcn UI's calendar

Thumbnail for How to build a Figma design system component using Shadcn UI's calendar

Hey there! I'm Roy, a UI designer excited to show you how to create a Figma component using Shadcn UI as a reference. If your team is using tools like Next.js, React, and Tailwind CSS alongside Shadcn UI, you're already off to a great start.

For early-stage startups, syncing your design system with a production-ready site can be a tricky balancing act. But combining Figma with Shadcn's components and Tailwind CSS principles? That's a game-changer. Today, we're diving into how you can build a flexible calendar component using these tools. Let's get started!

Why use Shadcn UI?

Shadcn UI is built on Radix UI Primitives, which are known for accessibility and robust keyboard navigation—two things that are often a pain to build from scratch. Its popularity also comes from its live component demos, where you can see all the states in action. For startups, referencing high-quality components like these can save you time and headaches.

Getting started with Figma

Right now, I'm building a Figma design system that's rooted in Tailwind CSS principles. At this point in the journey (component #41, to be exact), it's time to tackle the calendar—a key piece for today's project.

Breaking down the Calendar

To design a calendar in Figma, we first need to focus on the smallest building blocks:

  • Cells: The calendar cells mirror Shadcn's structure. Use Figma's auto layout for consistent spacing, and align everything following Tailwind's spacing rules.
  • Variants and States: Build dynamic variants like default, disabled, active, and hover states to cover every possible interaction.
  • Headers and Labels: Style the header cells to match Shadcn's layout. Here's where typographic consistency with Tailwind CSS really pays off—everything stays clean and readable.

Bringing atoms together

Once we've got our atoms (like cells) in place, it's time to assemble them into bigger, functional pieces:

  • Rows and Layouts: Align rows horizontally in Figma, mimicking Shadcn's table-style layout.
  • Reusable Components: With all elements defined, group them into reusable components. Trust me—this makes your workflow way more efficient later.

Adding buttons and icons for interaction

A good calendar needs intuitive navigation, right? For that, we'll design buttons with icons for moving between months. Using Figma's variants, we can create polished interaction states that match Shadcn's sleek style.

The final touches: assembling the calendar

Now, it's time to bring it all together:

  • Spacing and Borders: Adjust padding, align buttons, and refine borders to achieve that clean, minimal look Tailwind is famous for.
  • Accessibility and Customization: Make your design accessible by exposing text layers for annotations and collaborating with engineers to ensure everything translates perfectly to code.

Wrapping it all up

Blending Shadcn UI principles with Figma's design power is an efficient way to create high-quality components—especially in an early-stage startup where time and resources are tight. By starting with a solid reference instead of reinventing the wheel, you can focus on refining and iterating with your team for the best results.

Thanks for coming along on this design journey! If you found this helpful, drop a comment with your thoughts, and keep an eye out for more design tips and tutorials.

Cheers, Roy