This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

phy-stitches
TypeScript icon, indicating that this package has built-in type declarations

4.2.7 • Public • Published

phy-stitches

All-in-JS template engine for you to write everything in JavaScript. No more HTML. No more CSS. Only JavaScript!

phy-stitches depends on Emotion CSS-in-JS styling engine.

This project is a fork of phy minimal hyperscript helpers. It allows you to use minimalist h helper function to create React/Preact elements. With phy-stitches, the css prop gets parsed by Emotion, so you can write everything in JS!

Starters

To quickly get started with phy-stitches, feel free to clone the starters:

Examples

To style an element, simply pass css prop:

const h = require('phy-stitches');

module.exports = function SomeComponent() {
  return h('#foo', h('span.bar', { css: { color: 'red' } }, 'whee!'));
};

You can create elements without any props, same as phy.

const h = require('phy-stitches');

module.exports = function SomeComponent() {
  return h('#foo', h('span.bar', 'whee!'));
};

License

phy-stitches is a fork of phy which is under BSD-3-Clause license.

Readme

Keywords

none

Package Sidebar

Install

npm i phy-stitches

Weekly Downloads

2

Version

4.2.7

License

BSD-3-Clause

Unpacked Size

15.3 kB

Total Files

8

Last publish

Collaborators

  • chen.so