π¬ Mantine Extensions Tutorials #1: show an API response as a JSON tree
Hey everyone π
I've started something new for Mantine Extensions: short narrated tutorials, one task each, with the real component on screen. The first one is about mantine-json-tree, our most downloaded extension (about 29k npm downloads last month).
In 75 seconds:
π¦ install it and import the styles once
π³ pass it a JSON response, open the nodes with their arrows
π withSearch keeps only the branches that match
π showPathOnHover shows the full path of any row
π withCopyToClipboard copies any node
π‘ One thing I got wrong in my own script: the tree starts closed. To have it open on load, add defaultExpanded; maxDepth (2 by default) only kicks in then. Running the real component while making the video caught it π
Which component should get the next one? split-pane, onboarding-tour, window... or something you're stuck on right now?
Docs: https://gfazioli.github.io/mantine-json-tree/
GitHub: https://github.com/gfazioli/mantine-json-tree
All the tutorials: https://www.youtube.com/playlist?list=PLdYqZHmBU1Bk


p/jot-2-0
p/interview-coach-3
p/runevr
p/google-cloud-platform
p/producthunt
p/findergit
p/lancetta
p/reso
p/many-displays
p/slotify-2
p/kodlo
p/ai-context-flow
p/airuncode
p/dino-kids
p/jev
p/supabase
p/lasso-11
p/aperture-7
p/raycast
Replies
answering my own question: all three are out π here's #2, mantine-split-pane, in under 2 min
βοΈ two panes and a draggable divider
π minWidth / maxWidth stop it where you want
π¨ variant="gradient" + withKnob for a handle you can see
π§² snapPoints snap within 10px, and a double-click resets both panes
π‘ found while filming: if both panes have grow, the divider won't drag. give the first one an initialWidth and let the second grow
#3, mantine-onboarding-tour: a first-run tour for your app, ~2 min
π a tour is just a list of steps (id, title, content)
π― mark each element with data-onboarding-tour-id
π¦ a step that matches no element shows up centered
β¨οΈ withStepCounter shows "1 of 3", arrow keys move between steps, Escape skips
gotcha I hit: after End, clicking your start button again does nothing, because started is still true. pass onOnboardingTourEnd={close} and it resets π
and #4, mantine-window πͺ a floating window people can drag and resize
π±οΈ drag it by the header, or by any part of it
βοΈ resize from any edge or corner: never below 250Γ100 by default, maxWidth caps it
π‘ yellow button or a double-click on the header collapses it
π΄ red button calls onClose, and the opened state stays yours
π’ green one opens the layouts: snap left, or fill the page
heads up: without opened the Window isn't rendered at all, easy to miss the first time π
which one should be next? π