spinner.py 817 B

1234567891011121314151617181920212223242526
  1. """Container to stack elements with spacing."""
  2. from typing import Optional
  3. from reflex.components.chakra import ChakraComponent, LiteralSpinnerSize
  4. from reflex.vars import Var
  5. class Spinner(ChakraComponent):
  6. """The component that spins."""
  7. tag = "Spinner"
  8. # The color of the empty area in the spinner
  9. empty_color: Optional[Var[str]] = None
  10. # For accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.
  11. label: Optional[Var[str]] = None
  12. # The speed of the spinner must be as a string and in seconds '1s'. Default is '0.45s'.
  13. speed: Optional[Var[str]] = None
  14. # The thickness of the spinner.
  15. thickness: Optional[Var[int]] = None
  16. # "xs" | "sm" | "md" | "lg" | "xl"
  17. size: Optional[Var[LiteralSpinnerSize]] = None