uosis / laminar-web-components

Web Component definitions for Laminar
MIT License
36 stars 8 forks source link

Laminar Web Components

Laminar type definitions for web component collections. Currently included collections:

Usage

Add dependency

Package is published to GitHub Packages in this repository. To reference it, you can use sbt-github-packages SBT plugin:

resolvers += Resolver.githubPackages("uosis")

libraryDependencies += "com.github.uosis" %%% "laminar-web-components-material" % "0.1.0"

Ensure you have sbt-scalajs-bundler plugin

Web Components have NPM dependencies.

Use components in your app

Web Components have similar interface to built-in elements. See examples below.

Examples

Component Showcase

Displays a collection of Web Components

To run:

Generator

generator folder contains Ammonite scripts used to generate component type definitions. If you want to tweak the generated types, changes should be made here.

To run code generation:

Adding new component to existing collection or modifying existing component

Adding new component collection