0

I've been using Material Design Lite (1.3) for a long time. Now I would like to use Material Design 3. (sporting this code which is still Material Design 1.3).

<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.orange-yellow.min.css">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>

But I am using a Chromebook with admin lock. Therefore it is not possible to build Material Design 3.

1 Answers1

1

You can use ESM bundler CDNs (fully in the browser), such as esm.run by jsdelivr.

<script src="https://esm.run/@material/web/all.js" type="module"></script>

Here's an example:

<label>
  I use Material 3!
  <md-checkbox checked></md-checkbox>
</label>

<md-outlined-button>Back</md-outlined-button> <md-filled-button>Next</md-filled-button>

<script src="https://esm.run/@material/web/all.js" type="module"></script>

(source: https://github.com/material-components/material-web/discussions/5239#discussioncomment-7721589)

(if this helps, please mark this answer as "solution" and upvote it. thanks!)

tiago
  • 111
  • 5