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
310
僕がAWSでやったこと
jey3dayo
0
430
monit入れてみた
jey3dayo
0
78
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1.1k
For a Future-Friendly Web
brad_frost
184
11k
Product Roadmaps are Hard
iamctodd
55
13k
Docker and Python
trallard
47
4.3k
Practical Orchestrator
shlominoach
192
12k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
How GitHub (no longer) Works
holman
316
150k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
760
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k