opensourceui
GitHubTwitter/X
  1. Home
  2. Components
  3. Text
  4. Drop Cap Editorial
Back to Text

Components / Text

Drop Cap Editorial

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

Editorial quote block with a large drop-cap letter, body text, and author attribution. Magazine typography without opening InDesign.

Preview

DDesign systems thrive when typography, spacing, and imagery share one visual language. Every card should feel intentional.

Editorial team

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/drop-cap-editorial-card.tsx in your project.

  4. 4

    Import and render:

    Example

    import { DropCapEditorialCard } from "@/components/text/drop-cap-editorial-card";

    <DropCapEditorialCard />

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/drop-cap-editorial-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
"use client";
 
import { forwardRef, type ComponentPropsWithoutRef } from "react";
 
import { cn } from "@/lib/cn";
import { Quote } from "lucide-react";
 
export type DropCapEditorialCardProps = Readonly<
{
dropCap?: string;
body?: string;
author?: string;
} & ComponentPropsWithoutRef<"div">
>;
 
// Production-ready Drop Cap Editorial component — styled with Tailwind CSS.
export const DropCapEditorialCard = forwardRef<
HTMLDivElement,
DropCapEditorialCardProps
>(
(
{
className,
dropCap = "D",
body = "Design systems thrive when typography, spacing, and imagery share one visual language. Every card should feel intentional.",
author = "Editorial team",
...props
},
ref,
) => (
<div
ref={ref}
data-slot="drop-cap-editorial-card"
className={cn(
"w-64 border border-neutral-100 bg-white p-5 font-sans",
className,
)}
{...props}
>
<Quote size={20} className="mb-3 text-neutral-300" />
<p className="text-sm leading-relaxed text-neutral-700">
<span className="float-left mt-0.5 mr-2 flex h-10 w-10 items-center justify-center rounded-lg bg-neutral-900 font-serif text-2xl font-light text-white">
{dropCap}
</span>
{body}
</p>
<p className="mt-4 text-[11px] font-semibold tracking-wide text-neutral-400 uppercase">
{author}
</p>
</div>
),
);
 
DropCapEditorialCard.displayName = "DropCapEditorialCard";
PreviousNext

On this

page

Jump to a section on this page.

  • lib/cn.ts
  • components/text/drop-cap-editorial-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.