GithubHelp home page GithubHelp logo

Skate

Build Status Downloads per month Join the chat at https://gitter.im/skatejs/skatejs Follow @skate_js on Twitter

Skate is a functional reactive abstraction over the 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.
  • 📚 Docs https://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

import Element, { html } from '@skatejs/element-lit-html';

export default class extends Element {
  static get props() {
    return {
      name: String
    };
  }
  render() {
    return html`
      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 the Custom Elements and the Shadow DOM standards. It is capable of operating without the Shadow DOM — it just means you don't get any encapsulation of your component's HTML or styles. It also means that it's up to you to provide a way to project content (i.e. <slot>). It's highly recommended you use Shadow DOM whenever possible.

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

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

Browser Support

Skate supports all evergreens and IE11, and is subject to the browser support matrix 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 your site. Become a sponsor!

skatejs's Projects

bore icon bore

An Enzyme-like testing utility built for the DOM and Web Components.

build icon build

[DEPRECATED] - Common build tasks for all Skate projects.

dom-diff icon dom-diff

Library for efficiently diffing and patching virtual and real DOM fragments.

kickflip icon kickflip

[DEPRECATED] - Functional web components based on the W3C web component specifications.

named-slots icon named-slots

[DEPRECATED] - A pseudo-polyfill for the Shadow DOM Named Slot API.

project icon project

Repository containing everything from roadmap to maintainer meetings.

shade icon shade

[DEPRECATED] - Simple ShadowDOM style templating.

sk-router icon sk-router

A web component router that's compatible with code-splitting out of the box.

skatejs icon skatejs

Effortless custom elements powered by modern view libraries.

ssr icon ssr

Your one-stop shop for testing and rendering web components on the server.

todomvc icon todomvc

Helping you select an MV* framework - Todo apps for Backbone.js, Ember.js, AngularJS, and many more

types icon types

[DEPRECATED] - Alternate binding types (e.g. attribute / classname) for SkateJS.

val icon val

VirtualDOM abstraction layer - give yourself better integration and full control over the DOM with any virtual DOM library that uses a Hyperscript-like API such as React and Preact.

vert icon vert

Official set of web components written with Skate.

wc-parser icon wc-parser

Parser declarative custom elements and imports into JavaScript definitions.

web-components icon web-components

[DEPRECATED] - The frictionless way to use the webcomponents/webcomponentsjs polyfills.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.