new BorderAction( borderType, color, borderWidth )

Description

Adds a border of the specified type around an image or video.

Parameters
Name Type Description
borderType 'solid'

The type of border (currently only 'solid' is supported). Use values in Border Values.

color string

The color of the border.

borderWidth number

The width in pixels.

Examples

			// Used through a builder function Border.solid(), and not by creating a new instance
			import {Cloudinary} from "@cloudinary/url-gen";
			
			const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});
			const image = yourCldInstance.image('woman');
			image.border(
			 Border.solid(15, 'green'),
			 // Or alternatively
			 Border.solid().width(15).color('green')
			);

Methods


width( borderWidth )

Description

Sets the width of the border

Parameters
Name Type Description
borderWidth number | string

The width in pixels.

Details

color( borderColor )

Description

Sets the color of the border.

Parameters
Name Type Description
borderColor string

The color of the border.

Details

roundCorners( roundCorners ) → {this}

Description

Rounds the specified corners of an image.

Parameters
Name Type Description
roundCorners RoundCornersAction
Returns
Details

solid( width, color ) → {this}

Description

Sets the style of the border.

Parameters
Name Type Description
width number | string

The width in pixels.

color string

The color of the border, e.g 'green', 'yellow'.

Returns
Details