New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

styled-shapes

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styled-shapes

html shapes implemented with styled-system props

  • 0.0.0
  • Source
  • npm
  • Socket score

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

Styled-Shapes

Styled-System compatible shapes for use in your JSX

demo

Usage

npm i styled-shapes

import { Shape, star, hexagon } from 'styled-shapes';

const Star = () => <Shape path={star}/>;
const CustomShape = () => <Shape path="M 0,0 1,0, 1,1, 0,1 Z"/>;
const ShapeWithBordersAndShadow = () => <Shape path={hexagon} border="1px solid black" boxShadow="0 0 .5em rgba(0,0,0,.5)"/>;

Notes

When width & height are not specified, <Shape/> will fit to fill a unit square (1em X 1em).

Supported Styled-System APIs

  • Space
  • Color
  • Typography
  • Layout
  • Flexbox
  • Background
  • Border
  • Shadow
  • Grid(❓)

Todo

  • Unit tests
  • Resize observer
  • Animations / Transitions
  • Border Style
  • More Cross browser testing (cough IE cough)

Bugs

  • Some path elements (bezier curves, arcs), leave artifacts.
  • At a large font size, artifacts between svg strokes appear. Checkout the stroke-position proposal.

License

MIT

Keywords

FAQs

Package last updated on 23 Nov 2020

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