Topic: Controls (Developer)
-
Element Controls
Element controls allow the user to change the content and appearance of an element. You can define the controls of an element with the set_controls() method in your element PHP class. Example…
-
Audio Control
The audio control lets you select an audio file from the media library. It also gives you various options to show/hide artist and title, choose between a light/dark theme, autoplay…
-
Background Control
The background control lets you set the following background properties: Background colorBackground imageBackground video (requires bricksBackgroundVideoInit script. See code example below) There are various settings for the background image and…
-
Border Control
The border control lets you set the following border properties: Border width (top/right/bottom/left)Background style (top/right/bottom/left)Background color (none/solid/double/dotted/dashed)Border radius (top/right/bottom/left) The example below illustrates how to apply a border via the css parameter and how to…
-
Box Shadow Control
The box-shadow control is a CSS control and you can set the following properties: Offset XOffset YSpreadBlurColorInset class Prefix_Element_Box_Shadow extends BricksElement { // Set builder controls public function set_controls() {…
-
Checkbox Control
The checkbox control is a simple on/off switch. If enabled it outputs a boolean value of true. Disabled it returns false. You can use it to conditionally show/hide other content…
-
Code Control
The code control embeds a code editor utilizing the amazing Ace editor library. Set the mode parameter to css, html or javascript for proper syntax highlighting and error notifications. class…
-
Color Control
The color control is a custom-built color picker that you won't find anywhere else. It lets you pick and adjust colors in hex, rgba and hsl format. It also includes…
-
Datepicker Control
The datepicker control provides a great interface for selecting a specific date and time and outputting it in the format of your choice. // Example: Countdown element class Prefix_Element_Countdown extends…
-
Dimensions Control
The dimensions control is perfect for adding multi-directional CSS properties such as margin and padding (top/right/bottom/left). You can set the directions to anything you want via the directions property. class Prefix_Element_Dimensions…
-
Editor Control
The editor control provides the default WordPress editor. To directly edit content in the builder preview set the inlineEditing properties. See the code example below: class Prefix_Element_Editor extends BricksElement {…
-
Filters Control
The filters control offers the following CSS filters: blur, brightness, contrast, hue, invert, opacity, saturation, sepia. class Prefix_Element_Filters extends BricksElement { // Set builder controls public function set_controls() { $this->controls['exampleFilters']…
-
Gradient Control
The gradient control lets you define an unlimited number of gradients that you can apply to text, background, and as an overlay. You can set the CSS selector in the…
-
Icon Control
The icon control lets you select and output icons from the following icon font libraries: Fontawesome 5Ionicons 4Themify class Prefix_Element_Icon extends BricksElement { // Set builder controls public function set_controls()…
-
Image Control
The image control lets you select a single image from your media library. Once an image has been selected you can choose an image size. You can either use the…
-
Image Gallery Control
The image gallery control lets you select multiple images from your media library. Once images have been selected you can choose the image size. Your selected images are stored in…
-
Info Control
The info control does not affect the HTML or CSS on the frontend. It serves as a builder-only helper controls to provide additional information. Example: the Alert element displays an…
-
Link Control
The link control give you the choice of different link types: Internal post/pageExternal URLPopup (image, video) class Prefix_Element_Link extends BricksElement { // Set builder controls public function set_controls() { $this->controls['exampleLink']…
-
Number Control
The number control represents a simple number input field. It has the following custom properties: unit (string: px, em, rem etc.)min (number)max (number)step (Default: 1) (Custom: '0.1' etc.) Use it…
-
Posts Control
The posts control lets you set query arguments to retrieve items of any post type. Use the returned value to set up a custom WP_Query to render the matching posts…
-
Repeater Control
The repeater control lets you create repeatable fields. Fields can be cloned, deleted and sorted via Drag & Drop. Use the fields argument to setup the field controls. class Prefix_Element_Posts…
-
Select Control
The select control lets you select an option from a dropdown. It can be used to render content or CSS styling. Use the options array to populate the dropdown with…
-
Slider Control
The slider control shows a draggable range input field. Default units are px, em and rem. You can set the following control parameters: units (array with custom units and min,…
-
SVG Control
The SVG control lets you select an SVG (Scalable Vector Graphic) file from the media library. The selected SVG returns an array with the following keys: id (media library item…
-
Text Control
The text control displays a text input field. You can set the following parameters: spellcheck: true/false. (Default: false)trigger: 'keyup'/'enter'. (Default: keyup)inlineEditing: Set to true to enable class Prefix_Element_Text extends BricksElement…
-
Textarea Control
The textarea control displays a textarea input field. You can set the following parameters: rows (number. Default: 5)readonly (true/false. Default: false)spellcheck (true/false. Default: false)inlineEditing (true to enable) class Prefix_Element_Textarea extends BricksElement {…
-
Text Shadow Control
The text-shadow control displays a popup that lets you set the CSS text-shadow of a specified HTML text element. class Prefix_Element_Textarea extends BricksElement { // Set builder controls public function…
-
Typography Control
The typography control provides the following CSS properties: font-familyfont-weighttext-aligntext-transformfont-sizeline-heightletter-spacingcolortext-shadow Use the exclude parameter to hide specific typography properties. Set popup to false to show control inline. class Prefix_Element_Typography extends BricksElement {…