Skip to main content

Border Interfaces

IBorderColor Interface

The IBorderColor interface defines color properties for each side of a border in a CSS-compatible format. Each property accepts a string representing a valid CSS color value, such as a named color ("red"), a hexadecimal color ("#ff0000"), or an rgba color value ("rgba(255, 0, 0, 1)").

This interface provides flexibility in setting individual colors for the top, right, bottom, and left borders of an element. You can also set a singl

PropertyTypesDescription
borderLeftColorstringSpecifies the color of the left border. Must be a valid CSS color value (e.g., 'red', '#ff0000', 'rgba(255, 0, 0, 1)').
borderRightColorstringSpecifies the color of the right border. Must be a valid CSS color value (e.g., 'blue', '#0000ff', 'rgba(0, 0, 255, 1)').
borderBottomColorstringSpecifies the color of the bottom border. Must be a valid CSS color value (e.g., 'green', '#008000', 'rgba(0, 128, 0, 1)').
borderTopColorstringSpecifies the color of the top border. Must be a valid CSS color value (e.g., 'yellow', '#ffff00', 'rgba(255, 255, 0, 1)').
borderColorstringSpecifies the color applied to all borders ( top,left,bottom,right ). Must be a valid CSS color value (e.g., 'black', '#000000', 'rgba(0, 0, 0, 1)').

IBorderWidth Interface

The IBorderWidth interface defines properties to set the width of each side of a border using valid CSS width values. Each property accepts a string representing any valid CSS width unit, such as pixels ("1px"), em units ("2em"), or percentages ("50%").

This interface enables you to define individual border widths for each side top, right, bottom, and left. Additionally, you can use the borderWidth property to apply the same width to all four borders.

PropertyTypesDescription
borderLeftWidthstringSpecifies the width of the left border. Must be a valid CSS width value (e.g., '1px', '2em', '50%').
borderRightWidthstringSpecifies the width of the right border. Must be a valid CSS width value (e.g., '1px', '2em', '50%').
borderBottomWidthstringSpecifies the width of the bottom border. Must be a valid CSS width value (e.g., '1px', '2em', '50%').
borderTopWidthstringSpecifies the width of the top border. Must be a valid CSS width value (e.g., '1px', '2em', '50%').
borderWidthstringSpecifies the width applied to all borders ( top,left,bottom,right ). Must be a valid CSS width value (e.g., '1px', '2em', '50%').

IBorderStyle Interface

The IBorderStyle interface defines properties to set the style of each side of a border using predefined border styles. Each property accepts a value from the CommonBorderStyles type, which includes options like 'solid', 'dashed', and 'dotted'.

This interface allows you to specify individual border styles for each side top, right, bottom, and left. Additionally, you can use the borderStyle property to apply the same style to all four borders.

PropertyTypesDescription
borderLeftStyleCommonBorderStylesSpecifies the style of the left border. Must be one of the common border styles (e.g., 'solid', 'dashed', 'dotted').
borderRightStyleCommonBorderStylesSpecifies the style of the right border. Must be one of the common border styles (e.g., 'solid', 'dashed', 'dotted').
borderBottomStyleCommonBorderStylesSpecifies the style of the bottom border. Must be one of the common border styles (e.g., 'solid', 'dashed', 'dotted').
borderTopStyleCommonBorderStylesSpecifies the style of the top border. Must be one of the common border styles (e.g., 'solid', 'dashed', 'dotted').
borderStyleCommonBorderStylesSpecifies the style applied to all borders (top, left, bottom, right). Must be one of the common border styles (e.g., 'solid', 'dashed', 'dotted').

IShortHandBorderOptions Interface

The IBorderOptions interface defines the attributes for configuring borders in a consistent manner. It includes properties for border width, color, and style, which can be applied to all sides of an element.

PropertyTypesDescription
borderWidthstringSpecifies the width to all borders ( top,left,bottom,right ). Must be a valid CSS width value (e.g., '1px', '2em', '50%'). Optional.
borderColorstringSpecifies the color applied to all borders ( top,left,bottom,right ). Must be a valid CSS color value (e.g., 'black', '#000000', 'rgba(0, 0, 0, 1)').
borderStyleCommonBorderStylesSpecifies the style of the border ( top,left,bottom,right ). Must be one of the common border styles (e.g., 'solid', 'dashed', 'dotted'). Optional.

IshorthandBorder Interface

The IBorderOptions interface defines the attributes for configuring borders in a consistent manner. It includes properties for all of the border options.

PropertyTypesDescription
borderLeftstringSpecifies the border size, border style, border color, of the left side border this it should follow this format ( 5px solid green )
borderRightstringSpecifies the border size, border style, border color, of the right side border this it should follow this format ( 5px solid green )
borderTopstringSpecifies the border size, border style, border color, of the top side border this it should follow this format ( 5px solid green )
borderBottomstringSpecifies the border size, border style, border color, of the bottom side border this it should follow this format ( 5px solid green )