Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@xyflow/svelte
Advanced tools
Svelte Flow - A highly customizable Svelte library for building node-based editors, workflow systems, diagrams and more.
Svelte Flow is a highly customizable component for building interactive graphs and node-based editors, built by the creators of React Flow.
☣️ Svelte Flow is still alpha and currently under heavy development. The API is relatively stable but some things might change. ☣️
🚀 Getting Started | 📖 Documentation | 📺 Examples | ☎️ Discord
The easiest way to get the latest version of Svelte Flow is to install it via npm, yarn or pnpm:
npm install @xyflow/svelte
You only need a few lines to get a fully interactive (e.g. select and drag nodes or pan and zoom) flow. If you want to learn more, please refer to the learn section, the examples or the API reference.
<script lang="ts">
import { writable } from 'svelte/store';
import { SvelteFlow, Controls, Background, BackgroundVariant, MiniMap } from '@xyflow/svelte';
// you need to import the styles for Svelte Flow to work
// if you just want to load the basic styleds, you can import '@xyflow/svelte/dist/base.css'
import '@xyflow/svelte/dist/style.css';
// We are using writables for the nodes and edges to sync them easily. When a user drags a node for example, Svelte Flow updates its position. This also makes it easier to update nodes in user land.
const nodes = writable([
{
id: '1',
type: 'input',
data: { label: 'Input Node' },
position: { x: 0, y: 0 }
},
{
id: '2',
type: 'custom',
data: { label: 'Node' },
position: { x: 0, y: 150 }
}
]);
// same for edges
const edges = writable([
{
id: '1-2',
type: 'default',
source: '1',
target: '2',
label: 'Edge Text'
}
]);
</script>
<SvelteFlow {nodes} {edges} fitView on:nodeclick={(event) => console.log('on node click', event)}>
<Controls />
<Background variant={BackgroundVariant.Dots} />
<MiniMap />
</SvelteFlow>
Show us what you make: Drop it in into our Discord Server, tweet at us, or email us at info@xyflow.com
Community Participation: Ask and answer questions in our Discord Server or jump in on Github discussions.
Squash Bugs: We can’t catch them all. Check existing issues and discussions first, then create a new issue to tell us what’s up.
Financial Support: If you are an organization who wants to make sure Svelte Flow continues to be maintained, reach out to us at info@xyflow.com
And of course, we love Github stars ⭐
If you want to check out the current version you need to run the following command from the root directory:
pnpm install
- install dependenciespnpm build
- needs to be done oncepnpm dev
- starts dev serverYou can now access the examples under http://127.0.0.1:5173
Svelte Flow is maintained by the team behind xyflow. If you need help or want to talk to us about a collaboration, reach out through our contact form or by joining our Discord Server.
Svelte Flow is MIT licensed.
FAQs
Svelte Flow - A highly customizable Svelte library for building node-based editors, workflow systems, diagrams and more.
The npm package @xyflow/svelte receives a total of 0 weekly downloads. As such, @xyflow/svelte popularity was classified as not popular.
We found that @xyflow/svelte demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.