React ColorBox - fieldAddons

Specifies ColorBox input field addons.

Type:

FieldAddons

| null
Default Value: null

Field addons are custom markup containers that you can add to either side of the ColorBox input field. The component arranges visual elements in the following order: beforeTemplate, ColorBox input, afterTemplate.

App.tsx
  • import { ColorBox, FieldAddons } from 'devextreme-react/color-box';
  •  
  • function beforeColorBoxRender(data) {
  • return (
  • <i class="dx-icon-chevronprev"></i>
  • );
  • }
  •  
  • function afterColorBoxRender(data) {
  • return (
  • <i class="dx-icon-chevronnext"></i>
  • );
  • }
  •  
  • function App() {
  • return (
  • <ColorBox ... >
  • <FieldAddons
  • beforeRender={beforeColorBoxRender}
  • afterRender={afterColorBoxRender}
  • />
  • </ColorBox>
  • );
  • }

afterComponent

An alias for the afterTemplate property specified in React. Accepts a custom component. Refer to Using a Custom Component for more information.

afterRender

An alias for the afterTemplate property specified in React. Accepts a rendering function. Refer to Using a Rendering Function for more information.

afterTemplate

A custom markup that displays content to the right of the input field.

Type:

template

Template Data:

Object

Data of the selected editor item.

beforeComponent

An alias for the beforeTemplate property specified in React. Accepts a custom component. Refer to Using a Custom Component for more information.

beforeRender

An alias for the beforeTemplate property specified in React. Accepts a rendering function. Refer to Using a Rendering Function for more information.

beforeTemplate

A custom markup that displays content to the left of the input field.

Type:

template

Template Data:

Object

Data of the selected editor item.