ToolJet allows you to create your own React component using the **Custom Component**, providing greater flexibility and customization for your application. The **Custom Component** has two main properties:
1.**[Data](#data)**: Used to pass data or query names to the component. These queries can be triggered from inside the component.
2.**[Code](#code)**: Used to write the React code for the **Custom Component**. ToolJet offers two built-in functions to interact with the component: [Update Data](#update-data-function) function and [Run Query](#run-query-function) function.
## Data
Data can be passed to a custom component using the **Data** field. The data should be structured as an object or an array of objects. Query name can also be passed through this field to trigger queries using the custom component.
<imgclassName="screenshot-full"src="/img/widgets/custom-component/data.png"alt="Custom Component Data Property"/>
Data fetched from a query can also be passed to the **Custom Component** in the data object.
<imgclassName="screenshot-full"src="/img/widgets/custom-component/query-data.png"alt="Custom Component Data Property"/>
## Code
The React code for a **Custom Component** can be added in the **Code** field. You can interact with the application through the custom component using the following parameter and in-built functions.
### Data Parameter
To access the data passed through the [data](#data) field, define the `data` parameter to the *MyCustomComponent* funtion.
#### Example
```js
import React from 'https://cdn.skypack.dev/react';
import ReactDOM from 'https://cdn.skypack.dev/react-dom';
import { Button, Container } from 'https://cdn.skypack.dev/@material-ui/core';
<imgclassName="screenshot-full"src="/img/widgets/custom-component/update-data.png"alt="Custom Component Data Property"/>
### Run Query Function
**Custom Component** in ToolJet can be used to trigger queries. You can specify the query name in the [data](#data) field. Use the in-built `runQuery` function to execute the query dynamically from within the **Custom Component**.
#### Example
```js
import React from "https://cdn.skypack.dev/react";
import ReactDOM from "https://cdn.skypack.dev/react-dom";
import { Button, Container } from "https://cdn.skypack.dev/@material-ui/core";
| Visibility | Controls component visibility. | Toggle on or off, or set programmatically using **fx**. |
| Border color | Sets the border color of the component. | Select a color from the color picker or set it programmatically using **fx**. |
| Border radius | Sets the corner radius of the component. | Enter a numeric value (default: `6`) or set it programmatically using **fx**. |
| Box shadow | Sets the box shadow properties of the component. | Select the box shadow color and adjust related properties or set it programmatically using **fx**. |
:::info
Any property having **fx** button next to its field can be **programmatically configured**.