Search code examples
node.jsexpresssemantic-ui

How to use Semantic UI installed via Npm?


I've just installed Semantic UI in my cloud9 instance via Npm using npm install --save semantic-ui But I got no way to use it. Do I need to require it? I got a new directory called semantic But What do I do with this?


Solution

  • You need to go into the semantic folder and build it with Gulp.

    After building it the necessary css and js files can be accessed in your html <head> section.

    <link rel="stylesheet" type="text/css" href="semantic/dist/semantic.min.css">
    <script
      src="https://code.jquery.com/jquery-3.1.1.min.js"
      integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
      crossorigin="anonymous"></script>
    <script src="semantic/dist/semantic.min.js"></script>
    

    See details here in section 'Install Semantic UI'.