Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Material Design と HTML5

Yohei Munesada
September 26, 2014

Material Design と HTML5

第3回 HTML5minutes!のキーノート。
Material Design, Polymer, Material Design in HTML5 についての内容です。

Yohei Munesada

September 26, 2014
Tweet

More Decks by Yohei Munesada

Other Decks in Technology

Transcript

  1. Material Design is … ✓ Google IO 2014Ͱൃද͞Εͨ ✓ GoogleࣾͷϓϩμΫτʹ͓͚Δڞ௨ͷϏδϡΞϧݴޠ

    ✓ Android L ͳͲ͜Ε͔ΒͷGoogle੡඼ʹ౥ࡌ͞ΕΔ༧ఆ ✓ ࿩୊ʹͳ͍ͬͯΔ͕ɺผʹੈքڞ௨ͱ͍͏༁Ͱ͸ͳ͍
  2. Goal of Material Design Develop a single underlying system that

    allows for a unified experience across platforms and device sizes ଟ༷ͳϓϥοτϑΥʔϜ΍σόΠεαΠζͰ ౷Ұͨ͠ମݧΛఏڙ͢Δ
  3. Material is the metaphor ϚςϦΞϧ͸ϝλϑΝʔͰ͋Δ ✓ ϚςϦΞϧσβΠϯ͸ૉ੖Β͍͠ݱ࣮ੈքΛݩʹ͍ͯ͠Δ ✓ ߹ཧతͳۭؒηΦϦʔͱϞʔγϣϯݪཧΛ౷߹͍ͯ͠Δ ✓

    ݱ࣮ੈքͱ͍ۙ͠࢖͍৺஍Λఏڙ͢Δ͜ͱͰ
 Ϣʔβʔ͸͙͢ʹͦͷΞϑΥʔμϯεΛཧղ͢Δ͜ͱ͕Ͱ͖Δ ✓ ࢴ΍ΠϯΫͷੈքΛࢀߟʹ͍ͯ͠Δ
  4. Parts of Material Design ✓ Animation ✓ Style ✓ Layout

    ✓ Components ✓ Patterns ✓ Usability http://www.google.com/design/spec/material-design/introduction.html
  5. Parts of Material Design ✓ Animation ✓ Style ✓ Layout

    ✓ Components ✓ Patterns ✓ Usability -Authentic Motion -Responsive Interaction -Meaningful Transitions -Delightful Details
  6. Parts of Material Design ✓ Animation ✓ Style ✓ Layout

    ✓ Components ✓ Patterns ✓ Usability -Color -Typography -Icons -Imagery
  7. Parts of Material Design ✓ Animation ✓ Style ✓ Layout

    ✓ Components ✓ Patterns ✓ Usability -Principles -Metrics and Keylines -Structure
  8. Parts of Material Design ✓ Animation ✓ Style ✓ Layout

    ✓ Components ✓ Patterns ✓ Usability -Bottom Sheets -Buttons -Cards -Chips -Dialogs etc…
  9. Parts of Material Design ✓ Animation ✓ Style ✓ Layout

    ✓ Components ✓ Patterns ✓ Usability -Selection -Gestures -Promoted Actions -Settings -Image Treatment etc…
  10. Parts of Material Design ✓ Animation ✓ Style ✓ Layout

    ✓ Components ✓ Patterns ✓ Usability -Accessibility
  11. Learn More … ✓ Google I/O 2014 Keynote
 https://www.google.com/events/io#wtLJPvx7-ys ✓

    Material Design Specification
 http://www.google.com/design/spec/material-design ✓ Material Design Overview
 http://static.googleusercontent.com/media/www.google.com/en//design/material-design.pdf
  12. Material Design to the Web ✓ Material Design ΛͲͷΑ͏ʹWebʹద༻͢Δ͔ ✓

    Polymer ͕ Material Design Λ࣮૷͍ͯ͠Δ ✓ ಛʹ Animation ෦෼͸͔ͳΓ೉ͦ͠͏
  13. Polymer vs jQuery, Backbone, Bootstrap, etc What is the difference

    between ޿͘ීٴٕͨ͠ज़Λར༻ ৽ٕज़Λར༻ Point1: ར༻ٕज़
  14. Polymer vs jQuery, Backbone, Bootstrap, etc What is the difference

    between ར༻ٕज़ΛΑΓศརʹ࢖͏ ৽ٕज़ͷར༻ͷ৔Λ͍ͪૣ͘ఏڙ͠ ϑΟʔυόοΫΛฦ͢ Point2: ໨త
  15. ✓ Web Components ✓ Web Animations ✓ Pointer Events ✓

    Data Binding What Polymer depends on ?
  16. - HTML Imports - HTML Template - Custom Elements -

    Shadow DOM UIίϯϙʔωϯτͷඪ४Խ ✓ Web Components ✓ Web Animations ✓ Pointer Events ✓ Data Binding What does Polymer use ?
  17. - CSS3 Transitions - CSS3 Animations - SVG Animations -

    requestAnimationFrame ந৅Խ͞ΕͨAnimationϞσϧ ✓ Web Components ✓ Web Animations ✓ Pointer Events ✓ Data Binding What does Polymer use ?
  18. What does Polymer use ? - Object.observe - MutationObserver DOMͱJSͱͷσʔλ࿈ܞ

    ✓ Web Components ✓ Web Animations ✓ Pointer Events ✓ Data Binding
  19. What does Polymer use ? - polymer-gestures σόΠεґଘ͠ͳ͍δΣενϟ ✓ Web

    Components ✓ Web Animations ✓ Pointer Events ✓ Data Binding
  20. How is Polymer related to material design ? Polymer played

    a key role in material design’s development: it is used to quickly prototype and iterate on design concepts. Polymer ͸ Material Design ͷϓϩτλΠϓͱͯ͠ ར༻͞Ε͍ͯͯɺͦͷσβΠϯίϯηϓτ͕ ܁Γฦ͠ద༻͞Ε͍ͯΔ http://www.polymer-project.org/resources/faq.html
  21. Core Elements Paper Elements ✓ core-header-panel ✓ core-toolbar ✓ core-drawer-panel

    ✓ core-icon ✓ core-ajax ✓ etc… about 40 items ✓ paper-button ✓ paper-icon-button ✓ paper-tab ✓ paper-ripple ✓ paper-shadow ✓ etc… about 20 items http://www.polymer-project.org/docs/elements/layout-elements.html
  22. Example : Header + Contents ಋೖ $ bower install Polymer/core-toolbar

    $ bower install Polymer/core-header-panel $ bower install Polymer/core-icons $ bower install Polymer/paper-icon-button ※ gitܦ༝΍zipϑΝΠϧͱͯ͠΋ೖखͰ͖·͢
  23. Example : Header + Contents ·ͨ͸શ෦Λಋೖ $ bower install Polymer/core-elements

    $ bower install Polymer/paper-elements ※ gitܦ༝΍zipϑΝΠϧͱͯ͠΋ೖखͰ͖·͢
  24. Example : Header + Contents HTML Import CSS <script src="platform.js"></script>

    <link rel="import" href="core-toolbar.html"> <link rel="import" href="core-header-panel.html"> <link rel="import" href="paper-icon-button.html"> <link rel="import" href="core-icons.html"> ※ bowerؔ࿈ͷύεΛলུͯ͠هड़͍ͯ͠·͢
  25. Example : Header + Contents HTML Import CSS <script src="platform.js"></script>

    <link rel="import" href="core-toolbar.html"> <link rel="import" href="core-header-panel.html"> <link rel="import" href="paper-icon-button.html"> <link rel="import" href="core-icons.html"> ※ bowerؔ࿈ͷύεΛলུͯ͠هड़͍ͯ͠·͢
  26. Example : Header + Contents HTML Import CSS <core-header-pannel> <core-toolbar>

    <paper-icon-button icon="add"></paper-icon-button> <span flex>Title</span> <paper-icon-button icon="search"></paper-icon-button> </core-toolbar> <p>Sample Content.</p> </core-header-pannel>
  27. Example : Header + Contents HTML Import CSS <core-header-pannel> <core-toolbar>

    <paper-icon-button icon="add"></paper-icon-button> <span flex>Title</span> <paper-icon-button icon="search"></paper-icon-button> </core-toolbar> <p>Sample Content.</p> </core-header-pannel>
  28. Example : Header + Contents HTML Import CSS <core-header-pannel> <core-toolbar>

    <paper-icon-button icon="add"></paper-icon-button> <span flex>Title</span> <paper-icon-button icon="search"></paper-icon-button> </core-toolbar> <p>Sample Content.</p> </core-header-pannel>
  29. Example : Header + Contents HTML Import CSS <core-header-pannel> <core-toolbar>

    <paper-icon-button icon="add"></paper-icon-button> <span flex>Title</span> <paper-icon-button icon="search"></paper-icon-button> </core-toolbar> <p>Sample Content.</p> </core-header-pannel>
  30. Example : Header + Contents HTML Import CSS <core-header-pannel> <core-toolbar>

    <paper-icon-button icon="add"></paper-icon-button> <span flex>Title</span> <paper-icon-button icon="search"></paper-icon-button> </core-toolbar> <p>Sample Content.</p> </core-header-pannel>
  31. Example : Header + Contents HTML Import CSS <core-header-pannel> <core-toolbar>

    <paper-icon-button icon="add"></paper-icon-button> <span flex>Title</span> <paper-icon-button icon="search"></paper-icon-button> </core-toolbar> <p>Sample Content.</p> </core-header-pannel>
  32. Example : Header + Contents HTML Import CSS core-header-pannel {

    background-color: white; width: 100vw; height: 100vh; } core-toolbar { background-color: #03A9F4; }
  33. Example : Header + Contents HTML Import CSS core-header-pannel {

    background-color: white; width: 100vw; height: 100vh; } core-toolbar { background-color: #03A9F4; }
  34. Example : Header + Contents HTML Import CSS core-header-pannel {

    background-color: white; width: 100vw; height: 100vh; } core-toolbar { background-color: #03A9F4; }
  35. How to use paper-ripple <!— Πϯϙʔτ —> ※ bowerؔ࿈ͷύεΛলུͯ͠هड़͍ͯ͠·͢ <div

    style=“position: relative;”> <paper-ripple fit></paper-ripple> </div> <script src=“platform.js”></script> <link rel="import" href=“paper-ripple.html"> <!— ࣮૷ —>
  36. How to use paper-ripple <!— Πϯϙʔτ —> ※ bowerؔ࿈ͷύεΛলུͯ͠هड़͍ͯ͠·͢ <div

    style=“position: relative;”> <paper-ripple fit></paper-ripple> </div> <script src=“platform.js”></script> <link rel="import" href=“paper-ripple.html"> <!— ࣮૷ —>
  37. <!— Πϯϙʔτ —> ※ bowerؔ࿈ͷύεΛলུͯ͠هड़͍ͯ͠·͢ <div style=“position: relative;”> <paper-ripple fit></paper-ripple>

    </div> <script src=“platform.js”></script> <link rel="import" href=“paper-ripple.html"> <!— ࣮૷ —> How to use paper-ripple
  38. paper-ripple in Developer Tools ▼<div style=“position: relative;”> ▼<paper-ripple fit> ▼#shadow-root

    <style> … </style> <canvas id=“canvas”> </paper-ripple> </div> CanvasΛ࢖͍ͬͯΔ!!
  39. paper-ripple in Developer Tools ▼<div style=“position: relative;”> ▼<paper-ripple fit> ▼#shadow-root

    <style> … </style> <div id=“bg”></div> <div id=“waves”></div> </paper-ripple> </div> 2014/9/20Ͱ͸
  40. paper-ripple in Developer Tools ▼<div style=“position: relative;”> ▼<paper-ripple fit> ▼#shadow-root

    <style> … </style> <div id=“bg”></div> <div id=“waves”></div> </paper-ripple> </div> 2014/9/20Ͱ͸ CSS3 TransitionΛར༻͍ͯ͠Δ
  41. ✓ .BUFSJBM%FTJHO ✓ (PPHMFࣾͷϏδϡΞϧݴޠ ✓ ݱ࣮ੈքΛݩʹ࡞ΒΕ͍ͯΔ ✓ Ξχϝʔγϣϯʹ͍ͭͯͷఆ͕ٛ͞Ε͍ͯΔ ✓ 1PMZNFS

    ✓ (PPHMF੡ͰະདྷΛ࡞ΔϥΠϒϥϦ ✓ ৽͍ٕ͠ज़͕ͨ͘͞Μར༻͞Ε͍ͯΔ 㾎 .BUFSJBM%FTJHOJO)5.- 㾎 1PMZNFSΛ࢖࣮ͬͯݱ͢Δ͜ͱ͕Ͱ͖Δ 㾎 CPXFSJOTUBMMͰಋೖ͸؆୯ 㾎 ࢖͏͜ͱͰίϯϙʔωϯτͷ֓೦ʹ৮ΕΔ͜ͱ͕Ͱ͖Δ Summary