Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Effortless custom elements powered by modern view libraries.

License

NotificationsYou must be signed in to change notification settings

skatejs/skatejs

Repository files navigation

Build StatusDownloads per monthJoin the chat at https://gitter.im/skatejs/skatejsFollow @skate_js on Twitter

Skate is a functional reactive abstraction overthe web component standards as a set of packages that enables you to write small, fast and scalable web components using popular view libraries such as React, Preact and LitHTML.

  • 🌏 Cross-framework compatible components.
  • ⚛️ Render components using your favourite view library, or none at all.
  • 👑 Guided conventions for best-practices when reflecting between, and reacting to attributes, properties and events.
  • 🌟 Full TypeScript support.
  • 📚 Docshttps://skatejs.netlify.com.

Getting started

The simplest way to get up and running is to start with a pre-configured element such as@skatejs/element-lit-html.

npm i @skatejs/element-lit-html

Simple example

importElement,{html}from'@skatejs/element-lit-html';exportdefaultclassextendsElement{staticgetprops(){return{name:String};}render(){returnhtml`      Hello,${this.name}!    `;}}

Other examples

  1. Todo list

Cli

There's a CLI to get you up and running:https://skatejs.netlify.com/packages/cli.

$ npm i -g @skatejs/cli$ skatejs

Polyfills

Skate builds upon theCustom Elements andthe Shadow DOM standards.It is capable of operating without the Shadow DOM — it just means youdon't get any encapsulation of your component's HTML or styles. It also meansthat it's up to you to provide a way to project content (i.e.<slot>). It'shighly recommended you use Shadow DOM whenever possible.

Though most modern browsers support these standards, some still need polyfillsto implement missing or inconsistent behaviours for them.

For more information on the polyfills, seethe web components polyfill documentation, emphasis on the caveats.

Browser Support

Skate supports all evergreens and IE11, and is subject to the browser supportmatrix of the polyfills.

Backers

Support us with a monthly donation and help us continue our activities.Become a backer!

Sponsors

Become a sponsor and get your logo on our README on Github with a link to yoursite.Become a sponsor!


[8]ページ先頭

©2009-2025 Movatter.jp