If you're looking for a quick and easy solution, here's one:
With 3 boxes to work with, assign a solid color to the first box, a gradient to the second, and another solid color to the third. You can see a demo of this in action below.
App.js
import React from 'react';
import './style.css';
export default function App() {
return (
<div>
<div className="row">
<div className="box"> </div>
<div className="box"> </div>
<div className="box"> </div>
</div>
</div>
);
}
Styles.css
.row {
display: flex;
}
.row .box:first-of-type {
height: 150px;
width: 33%;
border: 1px solid black;
background: #44107a;
}
.row .box {
height: 150px;
width: 33%;
border: 1px solid black;
background-image: linear-gradient(90deg, #44107a 0%, #ff0032 100%);
}
.row .box:last-of-type {
height: 150px;
width: 33%;
border: 1px solid black;
background: #ff0032;
}
Demo : Check out the Stackblitz demo here!