付録B よく使う Utility 一覧
実務で登場頻度の高いユーティリティを、カテゴリ別に厳選しました。網羅ではなく「まずこれを覚えれば大半は書ける」というセットです。
Spacing(余白・第10章)
- padding:
p-*px-*py-*pt-* pr-* pb-* pl-* - margin:
m-*mx-*my-*(負:-m-*) - 間隔:
gap-*(Flex/Grid)/space-x-* space-y-*
Sizing(サイズ・第14章)
- 幅高さ:
w-*h-*size-* - 割合・特殊:
w-1/2w-fullw-screenh-dvh - 制限:
min-w-*max-w-*min-h-*max-h-*
Typography(文字・第11章)
- サイズ/行間:
text-xs〜text-9xl、text-sm/6 - 太さ/字間:
font-normalfont-mediumfont-bold/tracking-tight - 揃え/装飾:
text-centertext-right/underline/truncateline-clamp-*
Colors(色・第12章)
bg-*text-*border-*ring-*(例:bg-blue-600text-white)- 不透明度:
bg-black/50
Flexbox(第15章)
flexflex-colflex-wrapjustify-centerjustify-between/items-centergrowshrink-0basis-*
Grid(第16章)
gridgrid-cols-*col-span-*row-span-*gap-*
Borders / Effects(第13章)
borderborder-2/rounded-mdrounded-fullshadow-smshadow-md/ring-2opacity-*blur-*
Layout(第14章)
blockinline-blockhiddenflexgridrelativeabsolutefixedsticky/inset-0top-*z-*overflow-hiddenoverflow-auto/object-cover
States / Variants(第6章)
- 状態:
hover:focus:focus-visible:active:disabled: - レスポンシブ:
sm:md:lg:xl:2xl:(およびmax-*:) - その他:
dark:group-*:peer-*:has-*:aria-*:data-*:motion-reduce: