title: Vaadin 10, how can I add the css class to div element in Java?
body: <p>I am trying to create a user list in UI cards like this,</p>
  
  <pre><code>&lt;style type="text/css"&gt;
      .userbox {
          left: 36px;
          color: black;
          font-family: arial;
          font-size: 17px;
          font-weight: 600;
          width: 300px;
          height: 150px;
          text-indent: 30px;
          box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.24);
      }
  
      .userbox:hover {
          background-color: #d1e7cd;
      }
  
      img {
          border-radius: 5%;
      }
  &lt;/style&gt;
  </code></pre>
  
  <p>I want to generate these HTML elements dynamically,</p>
  
  <pre><code>&lt;div class="userbox"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>How can I do that? I tried to create Div objects and add the styles but I couldn't find a way in Vaadin Flow.</p>