You can change three parameters for a NeatBricks gradient to control its appearance.
baseSize — to specify how large each brick or block of the gradient should be.
quadColors — to specify if the brick rows should alternate in colors.
brickOutline — to specify each brick's outline color.
let gradientObject = new NeatBricks({
element: boxElems[0],
colors: ,
classes:
});
gradientObject.animateGradient();
This gradient pattern uses the default NeatBricks styleOptions values.
let gradientObject = new NeatBricks({
element: boxElems[0],
colors: ,
styleOptions: {
baseSize: 60
},
classes:
});
gradientObject.animateGradient();
Here, I have set the baseSize to 60px which is smaller than the default value 100px.
let gradientObject = new NeatBricks({
element: boxElems[0],
colors: ,
styleOptions: {
quadColors: true
},
classes:
});
gradientObject.animateGradient();
Setting quadColors to true allows you to pass an array of four colors to create the bricks.
let gradientObject = new NeatBricks({
element: boxElems[0],
colors: ,
styleOptions: {
brickOutline: '#FFF'
},
classes:
});
gradientObject.animateGradient();
The brickOutline is black by default. Here, we change it to white.
let gradientObject = new NeatBricks({
element: boxElems[0],
colors: ,
styleOptions: {
quadColors: true,
brickOutline: '#FFF'
},
classes:
});
gradientObject.animateGradient();
This configuration allows the brick pattern to use four colors and a white outline.
let gradientObject = new NeatBricks({
element: boxElems[0],
colors: ,
styleOptions: {
quadColors: true,
brickOutline: '#F90'
},
classes:
});
gradientObject.animateGradient();
This configuration allows you to create bricks with four different colors and an orange outline.