Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nousantx/code-to-image-generator

Simple image generator with tenoxui classes.
https://github.com/nousantx/code-to-image-generator

css css-framework dom-to-image fast image image-generator javascript preact svg website

Last synced: 7 days ago
JSON representation

Simple image generator with tenoxui classes.

Awesome Lists containing this project

README

        




Code to Image Logo

# Image Generator

A very lightweight and simple code-to-image generator. You can use every CSS properties inside your element's class name or as html attributes or even use the predefined CSS property shorthands and it will converted into inline-styles.

The element will saved inside SVG's `foreignObject` before it got displayed on a canvas. It's easier to use inline-styles instead of using class names for the element. And that's where tenoxui do its magic, tenoxui will convert those class names, and the apply them to the element.

## Features

- **Inline-Style Based** - Use any CSS properties
- **Scaling** - Scale your image for better resolution
- **Output Image** - Save the image to PNG, JPEG, WebP, SVG or PDF (image)
- **Save & Load** - Save your current code to a json file and load them later
- **Templates** - Use various starter templates

## Example

To add a simple box, you can just write something like this :

```html


```

Or use predefined shorthands :

```html


```