Skip to main content

Installation

Adding CozyCSS to your website is quite easy. Here is how:

  1. Create a new index.html file in your project root.

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>CozyCSS demo</title>
    </head>

    <body>
    <h1>Hello world!</h1>
    </body>
    </html>
  2. Include our CSS and JS Place the <link> tag in the <head> for our CSS, and the <script> tag for our JavaScript before the closing </body>.

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>CozyCSS demo</title>
    <link href="https://cdn.jsdelivr.net/npm/cozycss/dist/cozycss.min.css" rel="stylesheet">
    </head>

    <body>
    <h1>Hello, world!</h1>
    <script src="https://cdn.jsdelivr.net/npm/cozycss/dist/cozycss.min.js"></script>
    </body>
    </html>
    info

    If you don't need tooltips or dropdowns, you don't need to include the JS.

  3. Done! Open your website and start playing with our components.