Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

phy-emotion

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phy-emotion

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

  • 4.2.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

phy-emotion

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

phy-emotion 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-emotion, the css prop gets parsed by Emotion, so you can write everything in JS!

Starters

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

Examples

To style an element, simply pass css prop:

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

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-emotion');

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

License

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

FAQs

Package last updated on 14 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc