4.1.3 • Published 7 months ago

tiny-svg v4.1.3

Weekly downloads
19,123
License
MIT
Repository
github
Last release
7 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-2949winx-form-winxwaleed-bpmn-jsx-design-core-jsx-flow-design-jswhite-bpmn-designersvg-curvesvite-vue-bpmn-processvite-vue-bpmn-process-demo01v0.1.x-test@dogtiti/cbayel-lowcode-materials@dogtiti/dmn-js-drd@bpmn-io/element-template-icon-renderer@bpmn-io/element-templates-icons-renderer@rsh-axelor/addons-bpmethixngonewebcomponentsjeeplus-bpmnkaka-bpmnjnpf-bpmnjnpf-bpmn-testipsamestit-vue-uizzzzz-bpmnzzzz-libui-user@deboxsoft/bpmn-jsygp-bpmn-jsyj-gateway-bpmn-jsyuchuangda-componentized-iotz-bpmn-test1zhdst-model-jsvirsical-bpmn-js@fast-crud/fast-bpmn@mqshensc/belink-bpmn-js@hieuquang2212/form@quarks/bpmn-extension@salman65/bpmn-js@salman65/diagram-js@os1-platform/workflow-designer@softwareatlas/blueprinted-diagram-jsmonax-bpmnp1test-ngx-bdoms-bpmn-jsoms-diagram-jsobject-diagram-jsprime-custom-modelingng2-easyuiphzjhbasicpostit-js-coreqn-bpmnreiciendisomnisrenew-librepellendusquodrepudiandaeexcepturiquidoloreptn-jsqqsl-ngx-bpmn-diagramsharewin-ui-vuegolfnet-editorgrt-bpmn-jsilloeumifml-jshz-bpmn-jsgw-gateway-bpmn-jslcp-bpmnmengmao-bpmnmdbda-js@telelogx/bpmn-js@web-utils/component@xuxiaoqin/spacex-bpmn@yitech/oftpapmn-diagram-jsapmn-jsarchimate-jschor-jscmmn-jscnhis-design-vuecustom-elements-examplebpmn-js-extendbpmn-js-freeiconbpmn-js-karsonbpmn-js-lswbpmn-js-mirrobpmn-js-modulesbpmn-js-cnbpmn-js-connectors-extensionbpmn-js-ecidibpmn-js-element-id-displayerbpmn-flowbpmn-jsbpmn-js-5
3.1.3

7 months ago

4.1.3

7 months ago

3.1.2

11 months ago

3.1.1

11 months ago

3.1.0

11 months ago

4.1.0

11 months ago

4.1.2

11 months ago

4.1.1

11 months ago

4.0.0

1 year ago

3.0.1

2 years ago

3.0.0

3 years ago

2.2.4

3 years ago

2.2.3

3 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

11 years ago