Skip to main content

BorderRadius

Corner radii for a rectangle, defined for all four corners.

Properties

  • bottom_left - Radius of the bottom left border corner.
  • bottom_right - Radius of the bottom right border corner.
  • top_left - Radius of the top left border corner.
  • top_right - Radius of the top right border corner.

Methods

  • all - Creates a BorderRadius where all radii are radius.
  • copy - Returns a copy of this object with the specified properties overridden.
  • horizontal - Creates a horizontally symmetrical BorderRadius where the left and right sides of the rectangle have the same radii.
  • only - Creates a border radius with only the given values.
  • vertical - Creates a vertically symmetric BorderRadius where the top and bottom sides of the rectangle have the same radii.

Properties

bottom_leftinstance-attribute

bottom_left: Number

Radius of the bottom left border corner.

bottom_rightinstance-attribute

bottom_right: Number

Radius of the bottom right border corner.

top_leftinstance-attribute

top_left: Number

Radius of the top left border corner.

top_rightinstance-attribute

top_right: Number

Radius of the top right border corner.

Methods

allclassmethod

all(cls, value: Number)

Creates a BorderRadius where all radii are radius.

copy

copy(top_left: Optional[Number] = None, top_right: Optional[Number] = None, bottom_left: Optional[Number] = None, bottom_right: Optional[Number] = None)

Returns a copy of this object with the specified properties overridden.

horizontalclassmethod

horizontal(cls, left: Number = 0, right: Number = 0)

Creates a horizontally symmetrical BorderRadius where the left and right sides of the rectangle have the same radii.

onlyclassmethod

only(cls, top_left: Number = 0, top_right: Number = 0, bottom_left: Number = 0, bottom_right: Number = 0)

Creates a border radius with only the given values. The other corners will be right angles.

verticalclassmethod

vertical(cls, top: Number = 0, bottom: Number = 0)

Creates a vertically symmetric BorderRadius where the top and bottom sides of the rectangle have the same radii.

Usage example

container_1.border_radius= ft.border_radius.all(30)