Border

Description

Adds a solid border around an image or video.

Learn more: Adding image borders

Examples

			import {Cloudinary} from "@cloudinary/url-gen";
			import {solid} from "@cloudinary/url-gen/actions/border";
			
			const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});
			const image = yourCldInstance.image('woman');
			image.border(
			 solid(15, 'green'),
			 // Or alternatively
			 solid().width(15).color('green')
			);
Details

Classes


new BorderAction( borderType, color, borderWidth )

Methods


<static> solid( width, color ) → {Actions.Border.BorderAction}

action

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'.

Details

<static> roundCorners( roundCorners ) → {Actions.Border.BorderAction}

action

Description

Sets the radius of the border.

Parameters
Name Type Description
roundCorners Actions.RoundCorners.RoundCornersAction

RoundCorners action.

Details