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 "agamigo.io/material/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 |
---|---|
The base package contains code shared by implementations of material components for GopherJS.
|
The base package contains code shared by implementations of material components for GopherJS. |
checkbox implements a material checkbox component.
|
checkbox implements a material checkbox component. |
dialog implements a material dialog component.
|
dialog implements a material dialog component. |
formfield implements a material formfield component.
|
formfield implements a material formfield component. |
icontoggle implements a material icontoggle component.
|
icontoggle implements a material icontoggle component. |
internal
|
|
linearprogress implements a material linearprogress component.
|
linearprogress implements a material linearprogress component. |
menu implements a material menu component.
|
menu implements a material menu component. |
persistentdrawer implements a material persistentdrawer component.
|
persistentdrawer implements a material persistentdrawer 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. |
snackbar implements a material snackbar component.
|
snackbar implements a material snackbar component. |
temporarydrawer implements a material temporarydrawer component.
|
temporarydrawer implements a material temporarydrawer component. |
textfield implements a material textfield component.
|
textfield implements a material textfield component. |
toolbar implements a material toolbar component.
|
toolbar implements a material toolbar component. |
Click to show internal directories.
Click to hide internal directories.