Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

179
Vistas
How to access material ui Expanded property in Expansion Panel

As shown in the picture below:

The property to be accessed

I needed to make the expansion panel (only the expansion part, when the expansion was active) occupy 100% of the Div it is currently occupying. That height: 100% does the job, but inside my styling, I can't access that property correctly.

My expansion panel code snippet:

<ExpansionPanel classes={{ root: classes.expanded }}

My styling:

expanded: {
  '&$expanded': {
    height: '100%'
  },
  margin: '0 !important',
  boxShadow: 'none',
  borderRadius: 0,
  '&::before': {
    content: 'none'
  }
}

But when rendering my styling it results in the following picture:

enter image description here

It does not apply the styling to the .MuiExpansionPanel-root.Mui-expanded, instead, it is increasing the size of the box when it is not expanded.

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

see the MatUI api docs under the css section and the rule names. those are the keys you need to provide to the classes prop. You are setting your expanded class name to the root, you need to set it to expanded

EDIT based on code sandbox

this

  expandedPanel: {
     "&$expanded": {
        height: "100%"
     }
  }

is equivalent to the css

.expandedPanel.expanded{}

However, MatUI is conditionally applying the expandedPanel class already and there is not yet another .expanded class which is why it fails. you dont need to do the &$expanded check yourself. Just need to change it to

  expandedPanel: {
      height: "100%"
  }
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda