4.0.0 • Published 2 months ago

tiny-svg v4.0.0

Weekly downloads
19,123
License
MIT
Repository
github
Last release
2 months ago

tiny-svg

CI

tiny-svg is a minimal toolbelt for creating clean SVG applications.

Features

  • no wrapping magic, using native DOM elements instead
  • modular, just use what you need
  • 2kB minified + gzipped
  • innerSVG support
  • simplified attribute handling
  • geometry helpers

Checkout provided utilities.

Usage

import {
  appendTo,
  classes,
  create,
  innerSVG
} from 'tiny-svg';

var container = document.createElement('div');
var element = appendTo(create('svg'), container);

var g = appendTo(create('g'), element);

// add classes, SVG style!
classes(g).add('foo');

var text = `
  <g class="foo bar">
    <rect x="0" y="0" width="0" height="0" rx="50" ry="50"/>
  </g>
`;

// set innerSVG
innerSVG(g, text);

Your favourite module bundler should apply tree-shaking to only include the components your application requires. If you're using CommonJS modules give common-shake a try.

Related

  • min-dom - minimal DOM utility toolbelt
  • min-dash - minimal lodash inspired utility toolbelt

License

MIT

bpmnjs-kitgtopology-modelerbpmn-editor-wjbpmn-editor-wujinlegend-bpmn-editorqnbpmndc-online-form@infinitebrahmanuniverse/nolb-tiny-sobject-diagram-modeler@everything-registry/sub-chunk-2949phzjhbasicpostit-js-corezhdst-model-jsyuchuangda-componentized-iotwhite-bpmn-designerwinx-form-winxwaleed-bpmn-jsygp-bpmn-jsyj-gateway-bpmn-jsui-userx-design-core-jsx-flow-design-jsvirsical-bpmn-jsprime-custom-modelingrepudiandaeexcepturirepellendusquodrenew-libqn-bpmnquidoloreptn-jsreiciendisomnissvg-curvesvite-vue-bpmn-processvite-vue-bpmn-process-demo01dmn-js-drddiagram-jsdiagram-js-3diagram-js-by-prateekdiagram-js-cndiagram-js-code-editordiagram-js-cursor-debugdiagram-js-ecididiagram-js-extdiagram-js-freeicondiagram-js-griddiagram-js-grid-bgdiagram-js-hellodiagram-js-jldiagram-js-minimapdiagram-js-origindiagram-js-shareniu-extdw-mx-bpmn-jsgolfnet-editorgrt-bpmn-jsflowable-bpmn-modelerfixed_form_builder@mqshensc/belink-bpmn-jscustom-elements-exampleilloeum@rsh-axelor/addons-bpmifml-jsipsamest@salman65/bpmn-js@salman65/diagram-jsgw-gateway-bpmn-js@os1-platform/workflow-designerhz-bpmn-js@hieuquang2212/formentfrm-bpmnecidi-bpmn@quarks/bpmn-extensionjeeplus-bpmn@fast-crud/fast-bpmnit-vue-uikaka-bpmnng2-easyuiapmn-diagram-jsapmn-js@softwareatlas/blueprinted-diagram-js@xuxiaoqin/spacex-bpmnchor-jsmonax-bpmnarchimate-js@bpmn-io/element-template-icon-renderer@bpmn-io/element-templates-icons-renderer@telelogx/bpmn-jslcp-bpmn@web-utils/componentmengmao-bpmnmdbda-jsbpmn-flowbpmn-processbpmn-js-mirrobpmn-js-modulesbpmn-js-sketchybpmn-js-spiffworkflowbpmn-js-task-prioritiesbpmn-js-waxdhenbpmn-js-ygsoft-rcbpmn-lzh
4.0.0

2 months ago

3.0.1

1 year ago

3.0.0

2 years ago

2.2.4

2 years ago

2.2.3

2 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

10 years ago