π¬ 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/meridian-16
p/runevr
p/pushary
p/faraday-4
p/clipjack
p/temp-mail-370
p/leantake
p/many-displays
p/producthunt
p/reso
p/kodlo
p/iphotron
p/comcent
p/htmldrag
p/relai-agent-eval-loop
p/neoagent
p/gatrends
p/beamfy
p/kanasensei
p/phanera
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? π
#5 is out: mantine-video π¬ a video player with captions, ~2.5 min
π¦ install it together with Tabler icons, import the styles once
πΌοΈ src + poster + aspectRatio, and the bar fades out 3 s into playback
ποΈ sources: WebM first, MP4 second, the browser plays the first it can
π¬ tracks for WebVTT captions, and a CC button shows up on its own
β¨οΈ Space or K plays, arrows Β±5 s, J/L Β±10 s, M mutes
π§© variant moves the bar, Video.Controls lets you build your own
filming it turned up four bugs (captions hiding under the bar was the worst one), all fixed in 1.2.13 before the master π
which one should be next? π