AoiYamada / ui-lib-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UI Library Webpack Example

Demo how to make a UI lib with plain html, js and bootstrap

Usage

add ./dist/yamada-slider.js to html's head

const { Slider } = YamadaSlider;
const $ele = document.getElementById("targetId");
const imageInfos = [
  {
    src: "TestA.jpg",
    alt: "First",
  },
  {
    src: "TestB.jpg",
    alt: "Second",
  },
  {
    src: "TestC.jpg",
    alt: "Third",
  },
];

Slider($ele, imageInfos);

Dev Setup

yarn

Storybook Preview

yarn storybook

then go to http://localhost:6006/?path=/story/yamadaslider-slider--slider

About


Languages

Language:JavaScript 76.4%Language:CSS 17.9%Language:HTML 5.6%