Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

313
Views
How to make texts appear below icons in Buttons (Material UI)

Basically, this is my Button right now
enter image description here

I want to make the Dummy Button text to appear below the icon, how do I do that?
Here is my code

<Button className={classes.dummyButton}>
  <Image
   src="/buttonImage1.webp"
   alt="buttonimage1"
   width={48}
   height={48}
   />
<span>Dummy Button</span>
</Button>

Styles.js

dummyButton: {
    backgroundColor: 'green',
  },
about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

You want to set display: 'flex' and flexDirection: 'column' for column-direction elements placement inside your button:

dummyButton: {
    backgroundColor: 'green',
    display: 'flex',
    flexDirection: 'column'
  },
about 4 years ago · Juan Pablo Isaza Report

0

try To add A <br /> tag between image and div. This what I meant. This will help you https://codepen.io/ash_000001/pen/OJOQaGp?editors=1100

<Button className={classes.dummyButton}>
  <Image
   src="/buttonImage1.webp"
   alt="buttonimage1"
   width={48}
   height={48}
   />

<div>Dummy Button</div>
</Button>
Styles.js

dummyButton: {
    backgroundColor: 'green',
 
  },
about 4 years ago · Juan Pablo Isaza Report

0

I think you can put your image tag in another span and change its display to block.

Try this:

<Button className={classes.dummyButton}>
 <span className={classes.mySpan}>
  <Image
   src="/buttonImage1.webp"
   alt="buttonimage1"
   width={48}
   height={48}
   />
</span>
<div>Dummy Button</div>
</Button>

and your class styles should be like this:

.mySpan {
       display: 'block'
    }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!