타이포그래피

styled 패키지는 기본적으로 시스템 폰트 스택을 사용합니다:

--rdrp-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

이는 각 플랫폼의 OS 기본 폰트(macOS의 San Francisco, Windows의 Segoe UI, Android의 Roboto)로 렌더링됩니다. 시스템 폰트는 OS가 CJK, 아랍어 및 기타 문자 폴백을 자동으로 처리하므로 우수한 다국어 지원을 제공합니다.

이를 재정의하려면 조상 요소에 --rdrp-font-family를 설정하세요. 피커에 계단식으로 적용됩니다.

CSS 변수 인라인 스타일

래퍼 요소의 style 속성을 통해 폰트를 재정의하세요:

import { useState } from "react";
import { DatePicker } from "react-date-range-picker-styled";
import "react-date-range-picker-styled/rdrp-styles.css";
function CSSCustomFont() {
const [value, setValue] = useState<Date | null>(null);
return (
<div
style={{
["--rdrp-font-family" as string]: '"Georgia", "Times New Roman", serif',
}}
>
<DatePicker value={value} onChange={setValue} />
</div>
);
}

폰트 패밀리

래퍼에 --rdrp-font-family를 설정하여 폰트 패밀리를 전환하세요:

import { useState } from "react";
import { DatePicker } from "react-date-range-picker-styled";
import "react-date-range-picker-styled/rdrp-styles.css";
const fonts = {
System: {},
Serif: { "--rdrp-font-family": '"Georgia", "Times New Roman", serif' },
Mono: { "--rdrp-font-family": '"Menlo", "Courier New", monospace' },
};
type FontName = keyof typeof fonts;
function CompoundCustomFont() {
const [value, setValue] = useState<Date | null>(null);
const [font, setFont] = useState<FontName>("System");
return (
<div>
<div style={{ display: "flex", gap: 6, marginBottom: 12 }}>
{(Object.keys(fonts) as FontName[]).map((name) => (
<button
key={name}
onClick={() => setFont(name)}
style={{
padding: "6px 14px",
border: `1px solid ${font === name ? "#3b82f6" : "#d1d5db"}`,
borderRadius: 6,
background: font === name ? "#eff6ff" : "#fff",
cursor: "pointer",
fontSize: 13,
}}
>
{name}
</button>
))}
</div>
<div style={fonts[font] as React.CSSProperties}>
<DatePicker value={value} onChange={setValue} inline />
</div>
</div>
);
}
March 2026
Su
Mo
Tu
We
Th
Fr
Sa

웹 폰트 사용 (Noto Sans)

일관된 크로스 플랫폼 렌더링이나 i18n 프로젝트의 경우 Noto Sans와 같은 웹 폰트를 로드하고 변수를 재정의하세요:

import { DatePicker } from "react-date-range-picker-styled";
import "react-date-range-picker-styled/rdrp-styles.css";
// 1. Load Noto Sans in your HTML or CSS:
// <link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
// 2. Override the font variable:
<div style={{ "--rdrp-font-family": '"Noto Sans", sans-serif' } as React.CSSProperties}>
<DatePicker value={value} onChange={setValue} inline />
</div>;
import { useState, useEffect } from "react";
import { DatePicker } from "react-date-range-picker-styled";
import "react-date-range-picker-styled/rdrp-styles.css";
function CompoundNotoSans() {
const [value, setValue] = useState<Date | null>(null);
useEffect(() => {
// Load Noto Sans from Google Fonts (for demo purposes only)
if (!document.getElementById("noto-sans-font")) {
const link = document.createElement("link");
link.id = "noto-sans-font";
link.rel = "stylesheet";
link.href =
"https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&display=swap";
document.head.appendChild(link);
}
}, []);
return (
<div style={{ "--rdrp-font-family": '"Noto Sans", sans-serif' } as React.CSSProperties}>
<DatePicker value={value} onChange={setValue} inline />
</div>
);
}
March 2026
Su
Mo
Tu
We
Th
Fr
Sa

웹 폰트 갤러리

타이포그래피가 피커의 외관을 얼마나 극적으로 변화시키는지 확인하려면 다양한 웹 폰트를 비교해 보세요. 아래의 모든 폰트는 다국어 렌더링(라틴어, CJK, 한국어)을 지원합니다.

⚠️ 데모 전용

아래 폰트는 데모 목적으로 Google Fonts CDN에서 로드됩니다. 이 라이브러리는 웹 폰트를 번들로 제공하지 않으므로 프로젝트에서 직접 로드해야 합니다.

import { useState, useEffect } from "react";
import { DatePicker } from "react-date-range-picker-styled";
import "react-date-range-picker-styled/rdrp-styles.css";
const WEB_FONTS = [
{ name: "Noto Sans", family: '"Noto Sans", sans-serif' },
{ name: "Noto Serif", family: '"Noto Serif", serif' },
{ name: "IBM Plex Sans", family: '"IBM Plex Sans", sans-serif' },
{ name: "Roboto Slab", family: '"Roboto Slab", serif' },
];
const FONT_URL =
"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Sans:wght@400;500;600;700&family=Noto+Serif:wght@400;500;600;700&family=Roboto+Slab:wght@400;500;600;700&display=swap";
function CompoundWebFonts() {
const [value, setValue] = useState<Date | null>(null);
const [active, setActive] = useState(0);
useEffect(() => {
if (!document.getElementById("web-fonts-link")) {
const link = document.createElement("link");
link.id = "web-fonts-link";
link.rel = "stylesheet";
link.href = FONT_URL;
document.head.appendChild(link);
}
}, []);
return (
<div>
<div style={{ display: "flex", gap: 6, marginBottom: 12, flexWrap: "wrap" }}>
{WEB_FONTS.map((f, i) => (
<button
key={f.name}
onClick={() => setActive(i)}
style={{
padding: "6px 14px",
border: `1px solid ${active === i ? "#3b82f6" : "#d1d5db"}`,
borderRadius: 6,
background: active === i ? "#eff6ff" : "#fff",
color: active === i ? "#3b82f6" : "#374151",
cursor: "pointer",
fontSize: 13,
fontFamily: f.family,
}}
>
{f.name}
</button>
))}
</div>
<div style={{ "--rdrp-font-family": WEB_FONTS[active].family } as React.CSSProperties}>
<DatePicker value={value} onChange={setValue} inline />
</div>
</div>
);
}
March 2026
Su
Mo
Tu
We
Th
Fr
Sa

폰트 크기 및 두께

크기 및 두께 변수를 재정의하여 타이포그래피 밀도를 미세 조정하세요:

변수기본값설명
--rdrp-font-size-xs11px가장 작은 텍스트
--rdrp-font-size-sm12px요일 레이블
--rdrp-font-size-base13px일(day) 셀, 버튼
--rdrp-font-size-md14px트리거, 시간 항목
--rdrp-font-size-lg15px월(month) 제목
--rdrp-font-weight-normal400기본 두께
--rdrp-font-weight-medium500중간 강조
--rdrp-font-weight-semibold600선택된 일, 제목
--rdrp-font-weight-bold700오늘(today) 표시
import { useState } from "react";
import { DatePicker } from "react-date-range-picker-styled";
import "react-date-range-picker-styled/rdrp-styles.css";
const presets = {
Compact: {
"--rdrp-font-size-xs": "9px",
"--rdrp-font-size-sm": "10px",
"--rdrp-font-size-base": "11px",
"--rdrp-font-size-md": "12px",
"--rdrp-font-size-lg": "13px",
"--rdrp-font-weight-semibold": "500",
"--rdrp-font-weight-bold": "600",
},
Default: {},
Large: {
"--rdrp-font-size-xs": "13px",
"--rdrp-font-size-sm": "14px",
"--rdrp-font-size-base": "15px",
"--rdrp-font-size-md": "16px",
"--rdrp-font-size-lg": "18px",
"--rdrp-font-weight-semibold": "700",
"--rdrp-font-weight-bold": "800",
},
};
type PresetName = keyof typeof presets;
function CompoundCustomFontPopup() {
const [value, setValue] = useState<Date | null>(null);
const [preset, setPreset] = useState<PresetName>("Default");
return (
<div>
<div style={{ display: "flex", gap: 6, marginBottom: 12 }}>
{(Object.keys(presets) as PresetName[]).map((name) => (
<button
key={name}
onClick={() => setPreset(name)}
style={{
padding: "6px 14px",
border: `1px solid ${preset === name ? "#3b82f6" : "#d1d5db"}`,
borderRadius: 6,
background: preset === name ? "#eff6ff" : "#fff",
cursor: "pointer",
fontSize: 13,
}}
>
{name}
</button>
))}
</div>
<div style={presets[preset] as React.CSSProperties}>
<DatePicker value={value} onChange={setValue} inline />
</div>
</div>
);
}
March 2026
Su
Mo
Tu
We
Th
Fr
Sa