UIPin
ComponentsIconsIllustrationsMotionTemplatesApps
Boards
UIPin

Free, open-source UI components, icons, illustrations, motion, templates and apps, in one search. Every item links to its source and licence.

UIPin is free. If it saved you time, you can keep it running:

Buy me a coffee
ComponentsIconsIllustrationsMotionTemplatesAppsLibrariesCompareNew this weekMCP for agentsBoardsPrivacy

Components, icons and artwork belong to their authors and are shown under their open-source licences.

8bitcn/8-bit Date Picker

Inputs & forms
1 of 5
Compiling

Theme it

Every preview, live

Brand colour

Corner radius

Font

Recolours shadcn’s tokens, Tailwind’s accent colours and colours set in the code. Red, amber and green classes stay, since they usually mean error, warning or success.

5 versions·3 librariesCompare all calendars and date pickers →

  • 8-bit Date Picker
  • 8-bit Calendar
  • Calendar
  • Date picker
  • shadcn/ui

8-bit Date Picker

A simple 8-bit date picker component

npx shadcn@latest add https://www.8bitcn.com/r/date-picker.json
Open in v0 Docs Repo
Library
8bitcn
License
MIT
Stack
React · Tailwind CSS · radix
Packages
cndate-fnsradix-uireact-day-picker
Also adds
button, calendar, popover, select
Size
679 lines

Code

components/ui/8bit/date-picker.tsx

"use client";

import { format } from "date-fns";
import { Calendar as CalendarIcon } from "lucide-react";
import { type HTMLAttributes, useState } from "react";
import { Button } from "@/components/ui/8bit/button";
import { Calendar } from "@/components/ui/8bit/calendar";
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/components/ui/8bit/popover";
import { cn } from "@/lib/utils";

export function DatePicker({ className }: HTMLAttributes<HTMLDivElement>) {
  const [date, setDate] = useState<Date>();

  return (
    <Popover>
      <PopoverTrigger asChild>
        <Button
          className={cn(
            "w-full max-w-[310px] justify-start text-left font-normal",
            !date && "text-muted-foreground",
            className
          )}
          variant={"outline"}
        >
          <CalendarIcon className="mr-2 size-4" />
          <span className="truncate">
            {date ? format(date, "PPP") : <span>Pick a date</span>}
          </span>
        </Button>
      </PopoverTrigger>
      <PopoverContent className="w-full p-0">
        <Calendar
          className="border-y-0"
          mode="single"
          onSelect={setDate}
          selected={date}
        />
      </PopoverContent>
    </Popover>
  );
}

More like this

Date picker

HextaUI·Inputs & forms

8-bit Profile Card

8bitcn·Cards

8-bit Card

8bitcn·Cards

Dialog

HextaUI·Inputs & forms

Scrambled Text

React Bits·Text effectsMIT+

8-bit Input

8bitcn·Inputs & forms

Input Otp

shadcn/ui·Inputs & forms

8-bit Table

8bitcn·Navigation

Pagination

shadcn/ui·Navigation

8-bit Menu Bar

8bitcn·Overlays

Theme Toggler Button

Animate UI·ButtonsMIT+

Dock

Motion Primitives·Navigation

GitHub Stars Button

Animate UI·BackgroundsMIT+

8-bit XP Bar

8bitcn·Feedback & loaders

Side Panel

Cult UI·Other