Gradient Control
The gradient control lets you define an unlimited number of gradients that you can apply to text, background, and as an overlay.
For generated gradients, you can set the CSS selector, adjust the angle between 0 and 360°, and set a color stop for each color. Since Bricks 2.5, the Custom type accepts complete gradient values and CSS variable references. See Custom gradients for the Builder workflow.
class Prefix_Element_Gradient extends \Bricks\Element { // Set builder controls public function set_controls() { $this->controls['exampleGradient'] = [ 'tab' => 'content', 'label' => esc_html__( 'Gradient', 'bricks' ), 'type' => 'gradient', 'css' => [ [ 'property' => 'background-image', ], ], ]; }
// Render element HTML public function render() { echo get_bloginfo( 'name' ); }}Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.