본문 바로가기

머터리얼 디자인 웹 ( Material Design Component For Web )

web/html5 by 낼스 2020. 3. 8.

 

참고

0. Material site


1. Quick Start (CDN)

2. Material Icons : google font - Material Icons

3. Base MDC Component

  • MDCComponent : the basic mechanisms for implementing component classes.
  • MDCFoundation : following “private” properties to subclasses

4. 컴포넌트 정보 문서 - ( ex : Button )

  • "데모" , "문서"를 참고 할 수 있다, 다른 컴포넌트도 동일.
  1. demo : https://material-components.github.io/material-components-web-catalog/#/component/button
  2. document : https://material.io/develop/web/components/buttons/
  3. document(github) : https://github.com/material-components/material-components-web/tree/master/packages/mdc-button

5. Add MDC : https://material.io/develop/web/components

  • markup

  • instantiate mdc Component

    • https://material.io/develop/web/docs/importing-js/

    • using 1

    • using 2

6. Button : https://material.io/develop/web/components/buttons/

7. Snackbar : https://material.io/develop/web/components/snackbars/


8. Auto init - Auto Init

  • data-mdc-auto-init attribute to the root element with its value set to the component’s JavaScript class name (e.g., MDCTextField).
  • custom auto init : register, unregister

    • sample : https://jsfiddle.net/softm/sfgjw8z0/

       

댓글