Now In Code
Get access

Collapsible Branching Mind Map Canvas

A root card branches into five colored lines whose rounded connectors end in underlines beneath node text. Tapping a node folds or unfolds its subtree over 380 ms, + adds a child, and you can pan and pinch-zoom. Rendered with react-native-svg.

Inspired by a design posted on PinterestRebuilt from scratch by Now In Code

Agent prompt

Add the Now In Code component "collapsible-branching-mind-map-canvas" to this project.

The full source is attached at the end of this prompt. Put the files under components/collapsible-branching-mind-map-canvas/, install the listed dependencies with `npx expo install`, and render it on a route I can open.

Keep the timing and easing values documented in the source comments. Replace the sample copy and artwork with content from my app, or leave placeholders and list what I still need to supply.

=== Source files are attached here for paid plans ===
Pro piece. The prompt includes the full source.Get access

Details

Platforms
iOS, Android
Requires
Expo SDK 54+
Access
Pro
Updated
18 Nov 2026
License
Unlimited commercial projects
Original design
Pinterest

Are you the designer? Ask us to change or remove this.

CLI and MCP server Coming soon

Add pieces from the terminal or let your agent fetch them. Until then, Copy prompt does the same job. Docs

What it does

A light mind-map canvas on a pale grey background with a floating toolbar at the top left and a root card at the centre. Five coloured main branches extend from it, each with underlined labels and leaves, drawn as smooth connecting lines. Tapping a node selects it, shows a dashed frame with handle dots and a plus button, and folds or unfolds its subtree. Folded nodes shrink their children into the end of the parent's underline and show a small badge with the number of hidden items. The plus button adds a new idea under the selected node. Tapping the root collapses or expands everything. Dragging pans the canvas and two fingers zoom, between about 0.4 and 4 times.

How it's built

A shared core holds the data tree, a width table for the text so underline lengths match on every platform, the layout, connector paths, a mix function for transitions, a scene description, hit testing and an interaction controller. The React Native component draws everything with react-native-svg, uses a PanResponder for tapping, panning and pinching, and a requestAnimationFrame loop to run the transition. Folding and unfolding take a bit under half a second with an ease-in-out curve, and children fade in the later part of the unfold. Props cover width, whether to show the status bar and toolbar, a frozen mode and a selection callback.

Good for

  • Planning, goal-setting or knowledge-map views that need collapsible hierarchies
  • A health or habit app showing goals, areas and contributing factors
  • Any tree or outline editor where adding, folding and navigating should feel direct

Dependencies

react-native-svgreact-native

Tags

ButtonChartWork and CollaborationDesign ToolsDragExpand and CollapseHealth and FitnessIconLight ModeMinimalPath DrawingColorful and PlayfulReading and ContentState Transition

Related