Flowbite 타이포그래피 — 제목(Headings)
Flowbite 타이포그래피의 제목(Headings) 컴포넌트는 h1부터 h6까지의 제목 요소를 Tailwind CSS 유틸리티 클래스로 손쉽게 스타일링할 수 있게 해줘요. 일관된 계층 구조와 가독성을 위해 기본적으로 prose 클래스를 활용하는 걸 권장해요.
출처: 문서
본문
제목은 다음과 같이 각 레벨에 맞는 클래스를 조합해 크기와 두께, 색상을 지정할 수 있어요. dark 모드는 dark:text-white 형태로 처리해요.
<h1 class="text-3xl font-bold text-gray-900 dark:text-white">h1 제목입니다</h1>
<h2 class="text-2xl font-bold text-gray-900 dark:text-white">h2 제목입니다</h2>
<h3 class="text-xl font-bold text-gray-900 dark:text-white">h3 제목입니다</h3>
연속되는 제목 계층을 보여줄 때는 아래처럼 마크업을 구성해요.
<h1 class="text-5xl font-extrabold dark:text-white">제목 계층 예시</h1>
<h2 class="text-4xl font-extrabold dark:text-white">부제목</h2>
<h3 class="text-3xl font-bold dark:text-white">소제목</h3>
<p class="text-gray-500 dark:text-gray-400">본문 내용입니다.</p>
prose 클래스를 함께 쓰면 마크다운 콘텐츠가 자동으로 일관된 타이포그래피를 갖게 돼요.
<article class="prose dark:prose-invert">
<h1>제목</h1>
<p>본문 문단입니다.</p>
</article>