opensourceui
GitHubTwitter/X
  1. Home
  2. Components
  3. Text
  4. Notepad
Back to Text

Components / Text

Notepad

Free Text React component — NotepadCard. MIT licensed, copy-paste ready for Next.js and Tailwind CSS.

Sticky notepad with an italic quote, author line, and checkbox task list. Bookmark ribbon on top — good for editorial or productivity layouts.

Preview

Note to self

"Design is not just what it looks like and feels like. Design is how it works."

— S. Jobs

Ship the MVP
Write tests
Review PR #42

Setup

How to use

Free for personal and commercial use. No UI attribution required. Include the MIT copyright notice when copying component source into your project. Read the MIT license.

  1. 1

    Run in your terminal:

    $npm install clsx tailwind-merge lucide-react
  2. 2

    Copy lib/cn.ts below. Skip if you already have cn().

  3. 3

    Copy the code below and create components/text/notepad-card.tsx in your project.

  4. 4

    Import and render:

    Example

    import { NotepadCard } from "@/components/text/notepad-card";

    <NotepadCard title="Note to self" quote="Your quote here" author="Name" checklist={["One", "Two"]} />

lib/cn.ts

1
2
3
4
5
6
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
 
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}

components/text/notepad-card.tsx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import {
forwardRef,
type ComponentPropsWithoutRef,
type ReactNode,
} from "react";
 
import { cn } from "@/lib/cn";
import { Bookmark } from "lucide-react";
 
export type NotepadCardProps = Readonly<
{
title?: string;
quote?: string;
author?: string;
checklist?: string[];
bookmarkIcon?: ReactNode;
} & ComponentPropsWithoutRef<"div">
>;
 
// Production-ready Notepad component — styled with Tailwind CSS.
export const NotepadCard = forwardRef<HTMLDivElement, NotepadCardProps>(
(
{
className,
title = "Note to self",
quote = "Design is not just what it looks like and feels like. Design is how it works.",
author = "S. Jobs",
checklist = ["Ship the MVP", "Write tests", "Review PR #42"],
bookmarkIcon,
...props
},
ref,
) => {
return (
<div
ref={ref}
data-slot="notepad-card"
className={cn(
"relative w-60 border border-[#e6e2bc] bg-[#fffdf0] p-5 font-sans shadow-[5px_5px_0px_#e6e2bc]",
className,
)}
{...props}
>
{/* Bookmark */}
<div
data-slot="notepad-card-bookmark"
className="absolute top-3 right-3 text-[#a39e76]"
>
{bookmarkIcon ?? <Bookmark size={16} />}
</div>
 
{/* Note title */}
<h5
data-slot="notepad-card-title"
title={title}
className="mb-3 border-b border-[#e6e2bc] pb-1 font-mono text-[10px] tracking-widest text-[#a39e76] uppercase"
>
{title}
</h5>
 
{/* Quote content */}
<p
data-slot="notepad-card-quote"
className="font-serif text-sm leading-relaxed text-[#5c5a4a] italic"
>
&quot;{quote}&quot;
</p>
 
{/* Quote author */}
<p
data-slot="notepad-card-author"
title={author}
className="mt-4 text-right text-[10px] text-[#a39e76]"
>
— {author}
</p>
 
{/* Checklist */}
<div data-slot="notepad-card-checklist" className="mt-4 space-y-2">
{checklist.map((item) => (
<div
key={item}
className="flex items-center gap-2 text-xs text-[#5c5a4a]"
>
<div className="h-3 w-3 shrink-0 border border-[#c4bf98]" />
{item}
</div>
))}
</div>
</div>
);
},
);
 
NotepadCard.displayName = "NotepadCard";
PreviousNext

On this

page

Jump to a section on this page.

  • lib/cn.ts
  • components/text/notepad-card.tsx

Sponsor spot · demo preview

Logo

Your brand name

Your tagline or category

A short pitch about your product or service goes here. This is a preview of how sponsor cards will look in this sidebar.

Your call to action

This slot is available. Sponsor Opensource UI and reach developers browsing components every day.