Coder Social home page Coder Social logo

vongarcia97 / svelvet2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from open-source-labs/svelvet

0.0 0.0 0.0 6.69 MB

A lightweight Svelte component library for building interactive node-based flow diagrams

Home Page: https://svelvet.io

License: MIT License

JavaScript 13.33% TypeScript 15.20% CSS 1.07% HTML 2.88% Svelte 67.52%

svelvet2's Introduction

banner

MIT License NPM Downloads GitHub Stars GitHub Forks NPM Version

Simplify Diagramming with Svelvet!

Svelvet is a lightweight Svelte component library for building interactive node-based diagrams.

⚡ Getting Started | 📚 Documentation | ⌨️ Blog | 💬 Twitter | 💼 LinkedIn

Version Updates

Shout out to our contributors! Here's what's new:

Changelog

v1.0.3
  • Fixed bug with running tests
  • Added ability to render multiple unique Svelvet components
  • Added a 'clickCallback' customization option for nodes
v1.0.2
  • Fixed bug with importing types for TypeScript applications
  • Added a 'borderRadius' customization option for nodes
  • Fixed SVG zoom/pan bug (zoom/pan is now limited to Svelvet component only)

Key Features

  • Easy to use: To get started with Svelvet, all you need is data for nodes and edges. Visit our documentation website for streamlined, user-friendly tutorials and examples on how to get the most out of your Svelvet flowchart!
  • Interactive: Elegant and smooth interface when selecting a node to drag it across the graph.
  • Customizable: Ability to customize your nodes and edges (node size, color, border and edge type, label, anchor). More coming soon!
  • Fast rendering: Re-rendering is based on changes to initial values for nodes, edges and optional background.
  • Reliable: Svelvet is written in TypeScript and tested with Vitest, Playwright and Svelte Testing Library. Svelvet is maintained by motivated engineers seeking to contribute to the larger Svelte developer community and library ecosystem.
  • Room to Grow: There is so much we can do to improve, add features and make Svelvet the best version of itself - we welcome feedback and contributions! Scroll below for suggestions on what to contribute.

screenshot

Installation

Svelvet is available as both an npm and a yarn package. You can install it by running one of the two commands:

npm install svelvet
yarn add svelvet

Quick Start

Start by importing Svelvet into your application:

import Svelvet from 'svelvet';

A Svelvet component consists of nodes and edges (or just nodes). You can pass nodes and edges as props to the Svelvet component. You can add a dot-grid background like the example below. With the information that you provide for your nodes and edges, Svelvet will do all of the work behind-the-scenes to render your flowchart!

<Svelvet nodes={nodes} edges={edges} background />

Visit our website to learn more on how to customize your nodes and edges to your liking!

Testing

Testing is done with Vitest and the Svelte Testing Library. You can find tests in the /tests folder. In order to run the tests use the command:

npm run test

The Svelvet Team

How to Contribute

The following is a list of features and improvements by ourselves and the larger Svelte community for any open source developer to contribute. If you have any additional ideas, feel free to raise the issue or implement them as well!

  • Default values for nodes and edges
  • Constant node drag speed regardless of zoom in/out
  • Add left and right anchor locations
  • Contextual menus
  • Customize edges (source/target) with icons
  • Customize nodes via html templates/Svelte components
  • Multiple sockets and socket compatibility for links
  • Custom error handling
  • Increase test coverage for scalability
  • Integration with mobile (click and drag nodes on your phone/tablet)
  • More styling and customization of nodes and edges for complex Svelvet flow diagrams
  • Add a full stack feature to the documentation website with authentication and database that allows users to login, create and save their Svelvet diagrams

Credits

Inspired by React Flow, Svelvet expands the tools available to Svelte developers and makes Svelte more inviting to both new and seasoned software engineers. Under the hood, Svelvet depends on the d3-zoom library to zoom and pan across the graph.

License

Svelvet is developed under the MIT license.

svelvet2's People

Contributors

alia12336 avatar andrew-widjaja avatar anulepau avatar avarun42 avatar azambran21 avatar brycedorn avatar carlwoodward avatar justinwouters avatar limd96 avatar myhrmans avatar pauliorandall avatar tensioncoding avatar vongarcia97 avatar willettamt 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.