Code Monkey home page Code Monkey logo

remind's Introduction

Remind

Build packages Quality Gate Status

remind - Headless, framework-agnostic, extendable mindmap editor. | Product Hunt

A headless, framework-agnostic and extendable mindmap editor.

drawing

Feature

  • Highly extendable, take full control over styling and behavior
  • With default undo, redo, navigation, drag, CRUD, shortcut implementation (but can be replaced)
  • Framework-agnostic, remind can work with vanilla javascript, vue, react or any other framework
  • TypeScript, remind is written in typescript and has great typescript support

Installation

npm i remind-core remind-contributions

Quick Start

import { createMindmap, TopicData } from 'remind-core'
import 'remind-core/dist/style.css'
import { contributions } from 'remind-contributions'

const customData: TopicData = {
  id: '7bf8fd567273',
  title: 'Central Topic',
  children: [
    {
      title: 'main topic 1',
      id: 'f4cb61397246',
    },
    {
      title: 'main topic 2',
      id: 'fa4df6c9708c',
      children: [
        {
          title: 'sub topic 1',
          id: 'f4cb61397241',
        },
      ],
    },
  ],
}

createMindmap(document.querySelector('#app')!, {
  value: customData,
  contributions,
})

API

Create mindmap

instance: RefObject<ContributionAPI> = createMindmap(containerNode, options)

Render mindmap into containerNode, return an instance.

instance.current holds ContributionAPI, which let you change editor's content, undo redo history, change selected topic...

see packages/core/src/interface/contribute.ts for more.

options

option type description default
value TopicData set mindmap data -
onChange (value: TopicData) => void listen to value change -
layout 'mindmap' | 'structure' - mindmap
locale 'en' | 'cn' | 'ja' language localization en
theme Theme - -
contributions Contribution[] - []

options.layout can changed layout algorithm

options.theme let you customize mindmap style, see packages/core/src/interface/theme.ts for more documentation

options.contributions can extend editor's functionality, custom editor's behavior or add custom render content. see packages/contributions/src how to use it.

Export mindmap as svg/image

See /packages/core/src/utils/to, how to use it

License

MIT License

remind's People

Contributors

rick-you avatar dependabot[bot] avatar msftgits avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.