Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Next.js のApp Router を学ぶ際、shadcn/ui が 参考になったという話
Search
Junya Nakazato
June 24, 2024
0
150
Next.js のApp Router を学ぶ際、shadcn/ui が 参考になったという話
Next.jsのApp Routerを学ぶ際に、UIライブラリを探していたところ、shadcn/uiが参考になったので紹介します。
Junya Nakazato
June 24, 2024
Tweet
Share
More Decks by Junya Nakazato
See All by Junya Nakazato
DIY入門 電動昇降机作製編
jey3dayo
0
84
【令和最新版】NeoVimフロントエンド開発
jey3dayo
1
250
React.jsでプロダクション環境を見据える
jey3dayo
1
290
僕がAWSでやったこと
jey3dayo
0
420
monit入れてみた
jey3dayo
0
67
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.6k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
99
YesSQL, Process and Tooling at Scale
rocio
174
15k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
It's Worth the Effort
3n
188
29k
Abbi's Birthday
coloredviolet
1
4.8k
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
340
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
160
Transcript
Next.js のApp Router を学ぶ際、shadcn/ui が 参考になったという話 NAKAZATO Junya CA ADVANCE,
Inc.
2
3 3 机DIY IoT CAD入門 Gadget カレー 自己紹介
4 ビジネス ドメイン • SEM広告 • 広告システムSRE • メディアサービス メッセージ監視
• サイバー・エージェント社内製 システム ◦ ウェブ予約システム ◦ Cisco CMX ◦ iPhone/Androidアプリ 他 自己紹介
みなさん UIライブラリ 何使ってますか!?
shadcn/ui とは
shadcn/uiとは 7 フレームワークやライブラリではなく、 コピペで利用できるサンプル集です。 Radix UI とTailwind CSS で構成されています。
shadcn/ui
shadcn/ui
UI周り デザイン周り アーキテクチャ-Headless UI + Tailwind CSS-
Radix UI スタイルを持たない Headless UI
Tailwind CSS こういうやつ <div class=”bg-sky-500 text-red-500”>
13 導入対象
1 • Headless UI • React Server Components 対応 •
ダークモード対応 CVA 関連技術
検証
16 利用方法 利用方法 導入
17 デザイン追加・変更はCVAで対応 使い方 <Button variants=”secondary” size=”lg” /> 利用方法
18 テーマ変更
19 テーマ変更 コピペでオッケー!
20 初見だと、いるのこれってなる? Radix Colors
21 ライト/ダークモードのカラーパレット Radix Colors
22 Gray 2 ダークモード実装に威力を発揮…! Radix Colors
23 Radix Colors Gray 2 ダークモード実装に威力を発揮…! “dark:”を書かなくても明度を反転 Radix Colors →
ダークモード実装支援
24 Color System 連携 こういうのもできる ./tailwind.config.js
学習という観点
学ぶ上で良かった点 26 • いち早くApp Router, RSC (React Server Components) の実装例を提供
• ライブラリ選定済み&実装サンプルの提供 ◦ Tailwind CSS の組み込み ◦ TanStack Table ◦ Radix UI のコンポーネント実装例 ◦ RSC の実装サンプル • カスタマイズの容易さ(←とは何かを学んだ) ◦ CVA でサンプル提供を意識
27 つまり… 新人研修とか教育にいいかも?
28 THANKS! 質問はありますか?