Skip to content
Yusaku01Public

About

Build easily animated flow diagrams from HTML nodes and connections

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Somen

English | 日本語

Somen is a framework-independent Web Component for animated flow diagrams written with HTML nodes and connections. The layout adapts to the available space and the size of each node.

This is an alpha release under the MIT license. The npm package is somenflow.

Animated communication flow between a browser, API, and database, with blue and green particles moving between three nodes

Add a diagram

Install the package in the project that will use it:

npm install somenflow@alpha

Register the custom elements once in a browser-side entry point:

import 'somenflow/register';

Then write the diagram in HTML:

<flow-diagram label="Request flow" autoplay>
  <flow-node name="client">Client</flow-node>
  <flow-connection label="Request"></flow-connection>
  <flow-node name="server">Server</flow-node>
</flow-diagram>

A connection between two nodes infers its endpoints. Set from and to for branches or reverse connections. Browser imports using the package name require a bundler or import map.

Groups use <flow-group name="phase" label="Phase">…</flow-group>; decision nodes use shape="decision". Connection labels appear on their lines and can be omitted. See groups and decisions and the development demo.

Scope and limitations

Somen targets small communication diagrams and process flows in articles and documentation. Connections determine layers, and branches keep source order within each layer. The default layout changes to a vertical direction in narrow spaces; wide branches scroll within the diagram. The CLI validates JSON projects and exports standalone HTML pages.

Playback starts automatically only with autoplay, and a reduced-motion preference prevents initial playback. Visitors can pause and resume a diagram. Without JavaScript, node text remains readable, but connections are not rendered.

Somen does not automatically lay out complex graphs or guarantee that lines never cross. Browser interaction has been checked in Chromium; Firefox, Safari, and assistive technology have not yet been verified.

Documentation

About

Build easily animated flow diagrams from HTML nodes and connections

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages