0.0.10 • Published 15 days ago

@sonnetjs/svg v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
15 days 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.10

15 days ago

0.0.9

24 days ago

0.0.8

29 days ago

0.0.7

29 days ago

0.0.6

29 days ago

0.0.5

1 month ago

0.0.4

1 month ago

0.0.3

1 month ago

0.0.2

1 month ago

0.0.1

1 month ago