
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
pure-web-components
Advanced tools
Web Components inspired by Pure CSS. 6 web components in 37KBs of uncompressed JS (without CSS or optional polyfills).
You can find the documentation for all the web components in this library here. You can also browse the Storybook with examples of each component here.
git clone https://github.com/whoisryosuke/pure-web-components.git
cd pure-web-components
yarn
yarn story
To build the component for production, run:
yarn build
To run the unit tests for the components, run:
yarn test
yarn generate pure-component-name-here
You will be prompted by the Stencil CLI about what files you'd like to generate, then it'll output the component into your src/components/ folder.
<script src='https://unpkg.com/pure-web-components@0.0.1/dist/pure-web-components.js'></script> in the head of your index.htmlnpm install pure-web-components --save<script src='node_modules/pure-web-components/dist/pure-web-components.js'></script> in the head of your index.htmlnpm install pure-web-components --saveimport pure-web-components;Found this guide that explains process well, with reasons why workarounds are used. Short answer: React doesn't pass props to Web Components correctly, so you have to use a combo of refs and utility class. It also handles events differently, using it's own form of synthetic events.
npm install pure-web-components --saveimport { defineCustomElements } from "pure-web-components/dist/loader";
defineCustomElements(window);
render() {
return (
<pure-form>
<fieldset class="pure-group">
<input type="text" class="pure-input-1-3" placeholder="Username">
<input type="text" class="pure-input-1-3" placeholder="Password">
<input type="text" class="pure-input-1-3" placeholder="Email">
</fieldset>
<fieldset class="pure-group">
<input type="text" class="pure-input-1-3" placeholder="Another Group">
<textarea class="pure-input-1-3" placeholder="Textareas can work here too"></textarea>
<input type="text" class="pure-input-1-3" placeholder="Even More Stuff">
<input type="text" class="pure-input-1-3" placeholder="Last Item">
</fieldset>
<pure-button type="submit" class="pure-input-1-3">Sign in</pure-button>
</pure-form>
)
}
Pure Web Components comes preloaded with 2-8, 12, and 24 column grids using class names formatted like .pure-u-1-4 (1/4 width or 1 part of a 4 column grid).
There are also responsive classes that use CSS media queries to only set the column width for certain viewports. For example, this button will be 1/2 width at mobile, or 1/3 at higher viewports: <div class="pure-u-sm-1-2 pure-u-md-1-3">. These classes require many viewport variations (each grid x column number x viewports = a lot of unused CSS without PurgeCSS). Because of this, only 2-5 and 12 columns are available responsively.
You can enable more grids by editing pure-grid.scss and using the grid-generator SASS mixin. The mixin accepts the number of columns, and an optional breakpoint. These breakpoints are defined in the @mixin respond-from which outputs media queries - also located in the same file.
<pure-button> component<pure-form> component<pure-grid> component<pure-grid> story examples<pure-base> component + story examples<pure-menu> component + story examples<pure-menu> CSS dropdowns<pure-table> component + story examples<pure-button-group> component + swap out in other component storiesFAQs
Pure Web Components
We found that pure-web-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.