Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@stencila/components
Advanced tools
@stencila/components
Stencil is a compiler for building fast web apps using Web Components.
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
Web Component tags may not be CamelCased and they must include a hyphen (-
) in the name.
Please follow the pattern of <stencila-(component-type)>
, for example <stencila-tab-list>
.
There are two ways to load these components into your project, a script
tag in an HTML file, or as a Node module.
<script type="module" src="https://unpkg.com/@stencila/components@latest/dist/stencila-components/stencila-components.esm.js"></script>
<script type="text/javascript" nomodule="true" src="https://unpkg.com/@stencila/components@latest/dist/stencila-components/stencila-components.js"></script>
In modern browsers supporting the module
attribute, only the components used on the page will be requested and lazy-loaded, keeping the page size low.
npm install @stencila/components --save
import '@stencila/components'
The best reference for how to use and combine these components is our component library.
The source code for the stories is written using simple lit-html
syntax and can be found here.
For general overview of working with WebComponents using plain JavaScript, the StencilJS website provides a good introduction.
Please visit the StencilJS documentation for up to date documentation.
FAQs
Stencila Web Components
We found that @stencila/components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.