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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Faster Mobile Websites
deanohume
310
31k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
160
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
YesSQL, Process and Tooling at Scale
rocio
174
15k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
エンジニアに許された特別な時間の終わり
watany
106
230k
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
Agile that works and the tools we love
rasmusluckow
331
21k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
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! 質問はありますか?