0.0.13 • Published 7 months ago

@sonnetjs/svg v0.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

sonnetjs/svg

sonnetjs/svg is a library for creating SVG elements using a simple and declarative API.

Features

  • Create SVG elements using a simple and declarative API.
  • Set attributes and properties of SVG elements using chainable methods.
  • Add children to SVG elements using children method.

Usage

  1. Run the following command to create a new SonnetJS project.
npx create-sonnet-app@latest
  1. Change directory to the newly created project.
cd [my-sonnet-app]
  1. Install the dependencies
npm i
  1. Install sonnetjs/svg
npm i @sonnetjs/svg
  1. Start the development server
npm run dev

Documentation

This is a simple example of how to use sonnetjs/svg to create an SVG element.

import { svg, rect } from '@sonnetjs/svg';

const element = svg()
  .width(100)
  .height(100)
  .children(rect().x(10).y(10).width(80).height(80).fill('red'));

License

sonnetjs/svg is licensed under the MIT license.

0.0.13

7 months ago

0.0.12

9 months ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago