title: How can I control daisyUI tailwind modal open as default
body: <p>I set daisyUI but not figure out how to control modal by condition</p>
  <p>I think similar with flowbite or bootstrap
  <a href="https://flowbite.com/docs/components/modal/" rel="nofollow noreferrer">https://flowbite.com/docs/components/modal/</a></p>
  <p>but daisyUI not implement hidden class yet, and there have</p>
  <p>modal-open method in libary</p>
  <p><a href="https://daisyui.com/components/modal/" rel="nofollow noreferrer">https://daisyui.com/components/modal/</a></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://cdn.jsdelivr.net/npm/daisyui@2.13.6/dist/full.css" rel="stylesheet" type="text/css" /&gt;
  &lt;script src="https://cdn.tailwindcss.com"&gt;&lt;/script&gt;
  
  &lt;!-- The button to open modal --&gt;
  &lt;label for="my-modal-4" class="btn modal-button"&gt;open modal&lt;/label&gt;
  
  &lt;!-- Put this part before &lt;/body&gt; tag --&gt;
  &lt;input type="checkbox" id="my-modal-4" class="modal-toggle"&gt;
  &lt;label for="my-modal-4" class="modal cursor-pointer"&gt;
    &lt;label class="modal-box relative" for=""&gt;
      &lt;h3 class="text-lg font-bold"&gt;Congratulations random Interner user!&lt;/h3&gt;
      &lt;p class="py-4"&gt;You've been selected for a chance to get one year of subscription to use Wikipedia for free!&lt;/p&gt;
    &lt;/label&gt;
  &lt;/label&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>so how can we config the modal view present visible?</p>
  <p>thanks a lot</p>