Get started with shoelace-css CDN

MIT licensed

Shoelace-CSS is a lightweight, modular CSS-in-JS library for building accessible, composable components in React.

Tags:
  • basics
  • css
  • starter

Stable version

Copied!

How to start using shoelace-css CDN


<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="https://cdn.cdnhub.io/shoelace-css/2.14.0/shoelace.css" />
  <title>Get started with shoelace-css CDN - cdnhub.io</title>
</head>
<body>
  <form class="form" onsubmit="event.preventDefault(); handleFormSubmit(event)">
    <sl-label for="name">Name:</sl-label>
    <sl-input id="name" name="name" value="John Doe" required></sl-input>
    <sl-error id="name-error" if="$form.name.invalid">Please enter a valid name.</sl-error>

    <button type="submit">Submit</button>
  </form>

  <script>
    function handleFormSubmit(event) {
      // Form validation and submission logic here
    }
  </script>
</body>
</html>

All versions