material

package
v0.0.0-...-1bbb42b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2021 License: MIT, MIT Imports: 0 Imported by: 0

Documentation

Overview

Quickstart Guide

1. In your project include the all-in-one distribution of the MDC javascript library and set it to the global variable "mdc". This can be done a number of ways (HTML script element, webpack, filename "mdc.inc.js" for gopherjs to pick up, etc).

2. Import a Material component from this project in your Go progrem.

import "github.com/vecty-components/material/components/checkbox"

3. Make the HTML suitable for that MDC component available to your GopherJS program. See: https://material.io/components/web/catalog/

<html>
  <body>
    <div class="mdc-checkbox">
      <input class="mdc-checkbox__native-control" type="checkbox">
    </div>
  </body>
</html>

4. Put that HTMLElement into a GopherJS object.

cbElem := js.Global().Get("document").Get("body").Get("firstElementChild")

5. Create a new instance of the component and start it.

cb := checkbox.CB{}
cb.Start(cbElem)

Directories

Path Synopsis
appbar implements a material appbar component.
appbar implements a material appbar component.
drawer implements a material drawer component.
drawer implements a material drawer component.
formfield implements a material formfield component.
formfield implements a material formfield component.
iconbutton implements a material iconbutton component.
iconbutton implements a material iconbutton component.
internal
menu implements a material menu component.
menu implements a material menu component.
radio implements a material radio component.
radio implements a material radio component.
ripple implements a material ripple component.
ripple implements a material ripple component.
selection implements a material selection component.
selection implements a material selection component.
slider implements a material slider component.
slider implements a material slider component.
tabbar implements a material tabbar component.
tabbar implements a material tabbar component.
textfield implements a material textfield component.
textfield implements a material textfield component.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL