Skip to content

What is the correct way to use own height(size) for default buttons/ input etc ? #1238

Answered by saadeghi
Kens-Jaswal asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you can customize the sizes from CSS file, as you mentioned.
Another way I would suggest is customizing the theme from tailwind.config.js:
https://play.tailwindcss.com/nY0VC5YL0O?file=config

module.exports = {
  plugins: [
    require('daisyui'),
  ],
  daisyui: {
    themes: [
      {
        light: {
          ...require("daisyui/src/colors/themes")["[data-theme=light]"],
          ".btn-xs": {
            "height": "2rem",
            "min-height": "2rem",
          },
          ".btn-sm": {
            "height": "3rem",
            "min-height": "3rem",
          },
          ".btn-md": {
            "height": "5rem",
            "min-height": "5rem",
          },
          ".btn…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@diegogb-08
Comment options

@saadeghi
Comment options

Answer selected by saadeghi
Comment options

You must be logged in to vote
1 reply
@saadeghi
Comment options

Comment options

You must be logged in to vote
2 replies
@johndporter
Comment options

@craigerskine
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants