Try CSS


clip-path: polygon(0 100%, 50% 0, 100% 100%);
.root {
  background-color: #e3c95d;
}
          
.triangle {
  background-color: #fff;
  width: 10rem;
  height: 10rem;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}