aspectratio.py 480 B

1234567891011121314151617181920
  1. """Interactive components provided by @radix-ui/themes."""
  2. from typing import Literal, Union
  3. from reflex.vars import Var
  4. from ..base import (
  5. CommonMarginProps,
  6. RadixThemesComponent,
  7. )
  8. LiteralSwitchSize = Literal["1", "2", "3", "4"]
  9. class AspectRatio(CommonMarginProps, RadixThemesComponent):
  10. """A toggle switch alternative to the checkbox."""
  11. tag = "AspectRatio"
  12. # The ratio of the width to the height of the element
  13. ration: Var[Union[float, int]]