Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Next.js のApp Router を学ぶ際、shadcn/ui が 参考になったという話
Search
Junya Nakazato
June 24, 2024
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Next.js のApp Router を学ぶ際、shadcn/ui が 参考になったという話
Next.jsのApp Routerを学ぶ際に、UIライブラリを探していたところ、shadcn/uiが参考になったので紹介します。
Junya Nakazato
June 24, 2024
Transcript
28 slides
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! 質問はありますか?
More Decks by Junya Nakazato
See All by Junya Nakazato
DIY入門 電動昇降机作製編
jey3dayo
0
110
【令和最新版】NeoVimフロントエンド開発
jey3dayo
1
330
React.jsでプロダクション環境を見据える
jey3dayo
1
300
僕がAWSでやったこと
jey3dayo
0
430
monit入れてみた
jey3dayo
0
76
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
Why Our Code Smells
bkeepers
PRO
340
58k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
610
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
480
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
Fireside Chat
paigeccino
43
4.1k
Optimizing for Happiness
mojombo
378
71k
Balancing Empowerment & Direction
lara
6
1.4k
Designing for humans not robots
tammielis
254
26k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k