Version: 3.0.7
Center
Center is a layout component that centers its child within itself.
Import#
- Center: Centers its child, pass
widthandheight - Square:
Centerbut we need to passsize(width and height) - Circle:
Centerwith roundborderRadius, passsize(width and height)
Examples#
Basic#
Put any child element inside it, give it any width or/and height. It'll ensure the child is centered.
Icon frames#
Center can be used to nicely position icons in the center and add frames around them.
Square and Circle#
Square and Circle automatically centers their children.
Props#
Center implements Box