🎬 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:
GitHub:
All the tutorials:

11 views

Add a comment

Replies

Best

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? πŸ‘€