JavaScript currently included in the MDS documentation site is for demonstration only.
The Design System uses JavaScript to:
When component functionality can’t be achieved through HTML and CSS alone, use example JavaScript to illustrate component functionality. MDS users will reference these examples to write their own JavaScript for their products. MDS users should not copy and paste example JavaScript into their products.
MDS strives to minimize third-party dependencies, so be sure example JavaScript is insufficient before suggesting a third-party dependency. Third-party JavaScript libraries can be used if they enable markup customization so that CSS classes and HTML structure align with BEM naming conventions for MDS.
Consider following points when choosing between Third-party libraries:
v10.0.0
.--save
flag to add them to MDS’s package.json
file. dependencies:copy
gulp task found in gulpfile.js
. This will copy them to the doc site’s asset path.