All Projects → heithemmoumni → svelte-mindmap

heithemmoumni / svelte-mindmap

Licence: other
Svelte component for MindMap

Programming Languages

javascript
184084 projects - #8 most used programming language
Svelte
593 projects

Projects that are alternatives of or similar to svelte-mindmap

android-thinkmap-treeview
Tree View; Mind map; Think map; tree map; custom view; 自定义;关系图;树状图;思维导图;组织机构图;层次图
Stars: ✭ 314 (+157.38%)
Mutual labels:  tree, mindmap
Graphview
Flutter GraphView is used to display data in graph structures. It can display Tree layout, Directed and Layered graph. Useful for Family Tree, Hierarchy View.
Stars: ✭ 152 (+24.59%)
Mutual labels:  tree, mindmap
Hierarchy
Layout algorithms for visualizing hierarchical data.
Stars: ✭ 110 (-9.84%)
Mutual labels:  tree, mindmap
Vue Mindmap
VueMindmap is a vue component for mindnode maps
Stars: ✭ 457 (+274.59%)
Mutual labels:  d3, mindmap
Butterfly
🦋Butterfly,A JavaScript/React/Vue2 Diagramming library which concentrate on flow layout field. (基于JavaScript/React/Vue2的流程图组件)
Stars: ✭ 2,343 (+1820.49%)
Mutual labels:  tree, mindmap
React D3 Tree
🌳 React component to create interactive D3 tree graphs
Stars: ✭ 543 (+345.08%)
Mutual labels:  d3, tree
svelte-slate
slate svelte view layer
Stars: ✭ 43 (-64.75%)
Mutual labels:  sveltejs
kvstore
KVStore is a simple Key-Value Store based on B+Tree (disk & memory) for Java
Stars: ✭ 88 (-27.87%)
Mutual labels:  tree
svelte-express-boilerplate
Boilerplate for developing full stack apps with Express and Svelte.js 📦
Stars: ✭ 60 (-50.82%)
Mutual labels:  sveltejs
datahub
Datahub v2
Stars: ✭ 16 (-86.89%)
Mutual labels:  d3
you-draw-it
Datenjournalismus: Nutzer können schätzen, wie sich Statistiken verändert haben und ihre Einschätzung danach überprüfen.
Stars: ✭ 24 (-80.33%)
Mutual labels:  d3
immutable-gametree
An immutable game tree data type.
Stars: ✭ 18 (-85.25%)
Mutual labels:  tree
omnia-editor
A lightweight open source block style editor built for the modern web.
Stars: ✭ 18 (-85.25%)
Mutual labels:  sveltejs
uck
숫자 -> 한글 단위 변환 모듈
Stars: ✭ 27 (-77.87%)
Mutual labels:  d3
FineChart-Saiku
d3.js visualize data for saiku-ui
Stars: ✭ 17 (-86.07%)
Mutual labels:  d3
DevSecOps-Toolchain
DevSecOps Toolchain
Stars: ✭ 102 (-16.39%)
Mutual labels:  mindmap
BBob
⚡️Blazing-fast js-bbcode-parser, bbcode js, that transforms and parses to AST with plugin support in pure javascript, no dependencies
Stars: ✭ 133 (+9.02%)
Mutual labels:  tree
svelte-box
A truffle box for svelte
Stars: ✭ 60 (-50.82%)
Mutual labels:  sveltejs
sveltekit-package-template
A barebones project that provides the essentials for writing highly-optimized, reusable packages in Svelte.
Stars: ✭ 26 (-78.69%)
Mutual labels:  sveltejs
ztree-for-react
jQuery zTreeV3.x 插件react封装
Stars: ✭ 22 (-81.97%)
Mutual labels:  tree

SvelteMindmap

SvelteMindmap is a svelte component for mindnode maps inspired by react-mindmap.

MIT License view on npm Svelte v3

svelte-mindmap

Installation

npm install --save svelte-mindmap

Usage

Bundler (Webpack, Rollup)

import Mindmap from 'svelte-mindmap';
let map = {
  title: null,
  nodes: [],
  connections: []
}

<Mindmap 
    map={map}
/>

Props

Prop Type Default Description
nodes Array [ ] Array of objects used to render nodes.
connections Array [ ] Array of objects used to render connections.
subnodes Array [ ] Array of objects used to render subnodes.
editable Boolean false Enable editor mode, which allows to move around nodes.

nodes

Array of objects used to render nodes. Below an example of the node structure.

{
  "text": "python",
  "url": "http://www.wikiwand.com/en/Python_(programming_language)",
  "fx": -13.916222252976013,
  "fy": -659.1641376795345,
  "category": "wiki",
  "note": ""
}

The possible attributes are:

  • text: title of the node
  • url: url contained in the node
  • fx and fy: coordinates (if not present they'll be generated)
  • category: category used to generate an emoji
  • note: note that will be visible on hover

connections

Array of objects used to render connections. Below an example of the connection structure.

{
  "source": "python",
  "target": "basics",
  "curve": {
    "x": -43.5535,
    "y": 299.545
  }
}

The possible attributes are:

  • source: title of the node where the connection starts
  • target: title of the node where the connection ends
  • curve.x and curve.y: coordinates of the control point of a quadratic bezier curve (if not specified the connection will be straight)

subnodes

Array of objects used to render subnodes. The structure is the same as for nodes with two additional attributes:

  • parent: title of the parent node
  • color: used for the margin color, needs to be a valid CSS color

Styling

Here's a list of all CSS classes for styling:

  • .mindmap-svg: main svg element containing the map;
  • .mindmap-node: foreignObject element representing a node;
  • .mindmap-node--editable: foreignObject element representing a node in editor mode;
  • .mindmap-subnode-group-text: foreignObject element containing all subnodes of a given node;
  • .mindmap-subnode-text: div element containing a subnode;
  • .mindmap-connection: path element for each connection;
  • .mindmap-emoji: img tag for emoji

Feedback would be much appreciated, questions, suggestions, issues are more than welcome.


If you like to support my open-source contributions and feeling generous, feel free to:

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].