Skip to content

Add instructions for installing DaisyUI#32

Closed
andyl wants to merge 1 commit intoelixir-tools:mainfrom
andyl:daisy
Closed

Add instructions for installing DaisyUI#32
andyl wants to merge 1 commit intoelixir-tools:mainfrom
andyl:daisy

Conversation

@andyl
Copy link
Contributor

@andyl andyl commented Jul 7, 2025

DaisyUI works well with Tailwind4 and Tableau.

This PR has comments in the site.css file that explain how to install Daisy in a Tableau app.

Following these instructions, both the CSS and JS work in Tableau.

I tested this on Ubuntu 22.04 with Tailwind 4, DaisyUI 5 and TableauNew 1.5.0.

To test, I copied Daisy HTML from https://daisyui.com/components into the template at lib/pages/home_page.ex

Here's the template function that I used for testing...

  def template(assigns) do
    ~H"""
    <div>
      <p class="bg-green-600">
        hello, world!
      </p>
      <p>
        <div class="badge badge-primary">Primary</div>
        <div class="badge badge-secondary">Secondary</div>
        <div class="badge badge-accent">Accent</div>
        <div class="badge badge-neutral">Neutral</div>
        <div class="badge badge-info">Info</div>
        <div class="badge badge-success">Success</div>
        <div class="badge badge-warning">Warning</div>
        <div class="badge badge-error">Error</div>
      </p>
      <p>
        <div class="tabs tabs-border">
          <input type="radio" name="my_tabs_2" class="tab" aria-label="Tab 1" />
          <div class="tab-content border-base-300 bg-base-100 p-10">Tab content 1</div>

          <input type="radio" name="my_tabs_2" class="tab" aria-label="Tab 2" checked="checked" />
          <div class="tab-content border-base-300 bg-base-100 p-10">Tab content 2</div>

          <input type="radio" name="my_tabs_2" class="tab" aria-label="Tab 3" />
          <div class="tab-content border-base-300 bg-base-100 p-10">Tab content 3</div>
        </div>
      </p>
      <p>
        <div class="tabs tabs-lift">
          <input type="radio" name="my_tabs_3" class="tab" aria-label="Tab 1" />
          <div class="tab-content bg-base-100 border-base-300 p-6">Tab content 1</div>

          <input type="radio" name="my_tabs_3" class="tab" aria-label="Tab 2" checked="checked" />
          <div class="tab-content bg-base-100 border-base-300 p-6">Tab content 2</div>

          <input type="radio" name="my_tabs_3" class="tab" aria-label="Tab 3" />
          <div class="tab-content bg-base-100 border-base-300 p-6">Tab content 3</div>
        </div>
      </p>
      <p>
        <div class="drawer">
          <input id="my-drawer" type="checkbox" class="drawer-toggle" />
          <div class="drawer-content">
            <!-- Page content here -->
            <label for="my-drawer" class="btn btn-primary drawer-button">Open drawer</label>
          </div>
          <div class="drawer-side">
            <label for="my-drawer" aria-label="close sidebar" class="drawer-overlay"></label>
            <ul class="menu bg-base-200 text-base-content min-h-full w-80 p-4">
              <!-- Sidebar content here -->
              <li><a>Sidebar Item 1</a></li>
              <li><a>Sidebar Item 2</a></li>
            </ul>
          </div>
        </div>
      </p>
      <p>
        <calendar-date class="cally bg-base-100 border border-base-300 shadow-lg rounded-box">
          <svg
            aria-label="Previous"
            class="fill-current size-4"
            slot="previous"
            xmlns="http://www.w3.org/2000/svg"
            viewBox="0 0 24 24"
          >
            <path fill="currentColor" d="M15.75 19.5 8.25 12l7.5-7.5"></path>
          </svg>
          <svg
            aria-label="Next"
            class="fill-current size-4"
            slot="next"
            xmlns="http://www.w3.org/2000/svg"
            viewBox="0 0 24 24"
          >
            <path fill="currentColor" d="m8.25 4.5 7.5 7.5-7.5 7.5"></path>
          </svg>
          <calendar-month></calendar-month>
        </calendar-date>
      </p>
    </div>
    """
  end


DaisyUI works well with Tailwind4 and Tableau.

Following these instructions, both the CSS and JS work in Tableau.
@mhanberg
Copy link
Contributor

mhanberg commented Jul 7, 2025

Couple things:

  • I'm not sure I support putting instructions for an arbitrary CSS library, if you think its important, it should be an option on the CLI
  • I'm not sure I think it makes sense to add an installer to a CSS library that is 2 lines to add. There isn't much boilerplate.

I'm going to close this, but feel free to keep the conversation going, I can re-open if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants