@coopdigital/component-squircles

2.4.6 • Public • Published

component-squircles

Co-op's squircles (half way between a aquare and a circle) are the shape of the centre of the Co-op logo's 'o'. We use it to draw a person's attention to a particular part of the page like an offer or something new.

Installation

Install via npm or Yarn:

$ npm install @coopdigital/component-squircles--save
# OR
$ yarn add @coopdigital/component-squircles

Usage

You can include component-squircles in your project by referencing it from your existing CSS via @import statement, i.e.:

@import "node_modules/@coopdigital/component-squircles/dist/squircles.css";

If you use PostCSS in your build pipeline, you can reference the sources directly like so:

@import "node_modules/@coopdigital/component-squircles/src/squircles.pcss";

If you use a postcss-import plugin, it gets even easier:

@import "@coopdigital/component-squircles";

Examples

Here's a bunch of examples, showing how you can integrate this CSS module in your project, based on most popular stacks of project. You can either use a post-processed and pre-built CSS form the dist directory, ot use PostCSS sources from the src dir.

The latter have certain dependencies, which should be consumed by your frontend toolkit to postprocess the CSS correctly.

Vue.js

TBD

React.js

TBD

Development

TBD

License

Copyright (c) 2021 Co-operative Group Limited. Licensed MIT.

Dependents (0)

Package Sidebar

Install

npm i @coopdigital/component-squircles

Weekly Downloads

2

Version

2.4.6

License

MIT

Unpacked Size

52.5 kB

Total Files

7

Last publish

Collaborators

  • coopexperience
  • omidantilong
  • mitcheh
  • matt-tyas
  • joemcgirr
  • hanross
  • coopjames