How to build a smoothly animated table of contents (by a bonfire🔥) w/ Bun, Framer Motion, Zustand
devaslife
View ChannelAbout
I'm an indie app developer based in Osaka, Japan. I'm currently living off of my own product called Inkdrop - a Markdown note-taking app (https://www.inkdrop.app/ ). I would like to publish my videos about: how to build good apps, how to attract users, my hobbies, etc. NOTE: I don't answer any personal questions - Please don't send me emails.
Latest Posts
Video Description
▶ Check out my product: Inkdrop - Markdown note-taking app https://www.inkdrop.app/?utm_source=devaslife&utm_medium=youtube&utm_campaign=vlog&utm_content=4g26x6FzuBU ▶ Join the Inkdrop discord server https://docs.inkdrop.app/start-guide/join-discord-server?utm_source=devaslife&utm_medium=youtube&utm_campaign=vlog&utm_content=4g26x6FzuBU ▶ Side notes: https://www.devas.life/how-to-build-a-smoothly-animated-table-of-contents-with-framer-motion-and-kuma-ui/ ▶ Source code https://github.com/craftzdog/smooth-toc-example Info ▶ My equipment http://uses.craftz.dog/ ▶ My dotfiles https://github.com/craftzdog/dotfiles-public ▶ My wallpaper packs are now available🥳 Check out serene imagery from my coding tutorials here: https://www.craftz.dog/wallpapers Follow me online here: ▶ Subscribe to my newsletter https://www.devas.life/ ▶ 𝕏 https://x.com/inkdrop_app ▶ Instagram https://instagram.com/craftzdog ▶ My second channel https://www.youtube.com/@craftzdog 00:00 Intro 01:17 Project overview 05:00 Init project with Bun 06:04 Configure the git repository 06:45 Add required modules 08:11 Change dev and build commands to use Bun 08:40 Configure Prettier 09:35 Replace the default`useState` implementation with Zustand 12:02 Configure Kuma UI 13:57 Add some personal ESLint Preferences 15:11 Add some personal TypeScript preferences 16:30 Rename uppercase filenames 17:27 Configure Vite's resolve alias 18:31 Normalize CSS 19:28 Remove the default styles 20:13 Add the color palette tokens 21:11 Add basic styles 23:32 Create a Container component 26:58 Create a MainContent component 30:58 Add an example content 32:56 Moving to the next location, and start a bonfire 36:49 Implement a Markdown renderer 41:07 Add a content store 44:45 Render Markdown content 46:30 Add a page title 49:55 Style Markdown content 53:40 Extract headings from the mdast tree 57:46 Add firewood 58:07 toc store 59:59 Morning coffee 01:00:31 Fix import bug 01:02:10 Register headings 01:04:34 Add custom heading component 01:09:44 Get slugs to work 01:12:03 Preserve heading refs 01:13:00 Sidebar 01:15:57 Markdown outline view 01:24:17 Fix the outline left border 01:25:02 Store outline item refs in the toc store 01:27:40 Register refs to the store 01:29:25 Highlight active section 01:32:53 Detect visible headings 01:40:05 Animate the active section highlighting bar 01:43:37 It works! Yayy Credits: ▶ BGM - Epidemic Sound https://www.epidemicsound.com/referral/p96aa8/ #CodeInNature #ReactJS #ASMR
Upgrade Today: iPhone 14 Must-Haves
AI-recommended products based on this video

BASESAILOR iPhone 16 16e Car Charger Adapter 3Pack,USB to USBC Connector Type C Female to A Male Cable Converter for iPhone 15 14 Pro Max Plus,Apple Watch 10,Airpods 4,iPad mini 7,Samsung Galaxy S25

URVNS 240W USB C Car Charger, Super Fast Charging 4-Ports PD3.1 140W/PD3.0 100W PPS 45W QC65W Type-C Car Adapter for MacBook Pro Laptop iPhone 15 14 Max iPad Samsung Galaxy S24/23/22 Pixel etc

UGREEN 130W Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging Car Adapter with 100W USB C Cable Compatible with Dell XPS, MacBook, iPhone 16 15 14 Pro Max, Galaxy S25 S24 Ultra, iPad Pro
![VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung](https://m.media-amazon.com/images/I/71bHSP1cRkL._AC_UL960_FMwebp_QL65_.jpg)
VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung

2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

Magnetic Wireless Charger for iPhone: Fodable 3 in 1 Charging Station for Multiple Apple Devices - Travel Charging Pad Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus & Airpod Global Recycled Standard

Magnetic Wireless Charger for iPhone - 3 in 1 Mag-Safe Charging Station for Multiple Devices Apple - Charger Stand Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus Airpods
![iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods](https://m.media-amazon.com/images/I/71xZOlUELbL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

DUEDUE for Samsung Galaxy S25 Plus Case Magnetic Samsung S24 Plus Case Clear Compatible with Magsafe Slim Cover with Stand Ring Shockproof Protective Case for Samsung S25 Plus/S24 Plus 6.7 Inch Clear

RALEAVO for iPhone 16 Case Compatible with MagSafe Strong Magnetic Phone Case Clear Floral Case for Women Girls Slim Hard Back Protective Case for iPhone 16 6.1"(Clear/Lavender)
![Vihibii for Samsung Galaxy S25 Clear Magnetic Case with Stand, Compatible with MagSafe, [Anti Yellowing] Shockproof & Scratch Proof, Transparent Silm Phone Case for Samsung Galaxy S25 6.2" 2025, Clear](https://m.media-amazon.com/images/I/717ZmH8AxsL._AC_UL960_FMwebp_QL65_.jpg)
Vihibii for Samsung Galaxy S25 Clear Magnetic Case with Stand, Compatible with MagSafe, [Anti Yellowing] Shockproof & Scratch Proof, Transparent Silm Phone Case for Samsung Galaxy S25 6.2" 2025, Clear

ESR for iPhone 16 Pro Max Case, Compatible with MagSafe, Shockproof Military-Grade Protection, Magnetic Phone Case for iPhone 16 Pro Max, Classic Hybrid Case (HaloLock), Clear

Wireless Charging Case for AirPods Pro 1st / 2nd Gen with Type-C Charging Port, Compatible with AirPod Pro 2nd Generation Replacement Case, with Blue-Tooth Sync Button, No Earbuds

Turtle Beach Stealth Ultra High-Performance Wireless Gaming Controller Licensed for Xbox Series X|S, Xbox One, Windows PC & Android – LED Dashboard, Charge Dock, RGB Lighting, 30-Hr Battery, Bluetooth
![Spigen Case for Galaxy S25 Case, Rugged Armor MagFit [Fast Wireless Charging] Compatible with MagSafe - Black](https://m.media-amazon.com/images/I/81osE87mFrL._AC_UL960_FMwebp_QL65_.jpg)
Spigen Case for Galaxy S25 Case, Rugged Armor MagFit [Fast Wireless Charging] Compatible with MagSafe - Black
![Spigen Case for iPhone 16 Pro Max Case, Rugged Armor [MagFit] Compatible with MagSafe - Matte Black](https://m.media-amazon.com/images/I/71Gh0VOQtlL._AC_UL960_FMwebp_QL65_.jpg)
Spigen Case for iPhone 16 Pro Max Case, Rugged Armor [MagFit] Compatible with MagSafe - Matte Black

McKlein McKleinUSA 80454 Lawson Leather Attache Case, Brown, 18 x 13 x 3.5

iWEOCO Compatible with Samsung S25 Case Wallet Genuine Leather Anti-Theft RFID Blocking Stand Strong Magnetic Clasp Closure Cash Credit Card Slots Protective Samsung S25 Wallet Case (Rose Gold)

Aswewamt 4 Pcs Mini Backpack Cosmetic Bag Keychain PU Leather Lipstick Holder Cute Case Coin Purse Wallet Card Holder Data Cable Organizer Zipper Pouch Portable Travel Storage Bag for Women, Multicolor
![IUQXU for Samsung Galaxy S25 Plus 5G Wallet Phone Case with Screen Protector [RFID Blocking] Leather Flip Card Holder Women Men Cell Phone Case for Samsung S 25 Plus 25S S25+ Galaxy S25Plus 5G Black](https://m.media-amazon.com/images/I/71sThlnU5IL._AC_UL960_FMwebp_QL65_.jpg)
IUQXU for Samsung Galaxy S25 Plus 5G Wallet Phone Case with Screen Protector [RFID Blocking] Leather Flip Card Holder Women Men Cell Phone Case for Samsung S 25 Plus 25S S25+ Galaxy S25Plus 5G Black
![MRGLAS 2025 Upgraded Magsafe Car Mount Vacuum Suction Magnetic Phone Holder Car, 360° Foldable Adjustable Suction Cup Phone Stand [89+LBS Suction & 2800gf Magnetic] for Car Accessories iPhone17/16](https://m.media-amazon.com/images/I/71UbeT7ccLL._AC_UL960_FMwebp_QL65_.jpg)
MRGLAS 2025 Upgraded Magsafe Car Mount Vacuum Suction Magnetic Phone Holder Car, 360° Foldable Adjustable Suction Cup Phone Stand [89+LBS Suction & 2800gf Magnetic] for Car Accessories iPhone17/16

OHLPRO Tablet Car Mount Universal Tablet Holder for Car Windshield Dash Dashboard, 360 Degree Rotation,TPU Suction Gel Stick, for iPad Mini 4/3/2/1Samsung Galaxy Size 7"- 10.5" Tablet Mount

Magnetic Car Mount Air Vent Cell Phone Holder, Universal Vehicle Dash Dashboard Ac Airvent Cellphone Magic Stand with Clip Hook, for iPhone 16 15 Samsung Lenovo Google etc

AINOPE Phone Holder for Car Vent 2025 Gravity Air Vent Car Phone Holder Mount for iPhone 16 Pro Max with Vent Clip Hand Free Cell Phone Car Mount for iPhone 16 Plus Samsung S25 Ultra Car Accesorries

BASESAILOR iPhone 16 16e Car Charger Adapter 3Pack,USB to USBC Connector Type C Female to A Male Cable Converter for iPhone 15 14 Pro Max Plus,Apple Watch 10,Airpods 4,iPad mini 7,Samsung Galaxy S25

URVNS 240W USB C Car Charger, Super Fast Charging 4-Ports PD3.1 140W/PD3.0 100W PPS 45W QC65W Type-C Car Adapter for MacBook Pro Laptop iPhone 15 14 Max iPad Samsung Galaxy S24/23/22 Pixel etc

UGREEN 130W Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging Car Adapter with 100W USB C Cable Compatible with Dell XPS, MacBook, iPhone 16 15 14 Pro Max, Galaxy S25 S24 Ultra, iPad Pro
![VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung](https://m.media-amazon.com/images/I/71bHSP1cRkL._AC_UL960_FMwebp_QL65_.jpg)



