Props modify the behavior and appearance of a component. They are passed in as keyword arguments to the component function.
Component Props
Each component has props that are specific to that component. For example, the rx.avatar component has a name prop that sets the name of the avatar.
JD
rx.avatar(name="John Doe")
Check the docs for the component you are using to see what props are available.
Reflex has a wide selection of built-in components to get you started quickly.
Style Props
In addition to component-specific props, most built-in components support a full range of style props. You can use any CSS property to style a component.
See the styling docs to learn more about customizing the appearance of your app.
HTML Props
Components support many standard HTML properties as props. For example: the HTML id property is exposed directly as the prop id. The HTML className property is exposed as the prop class_name (note the Pythonic snake_casing!).
Reflex apps can have a State that stores all variables that can change when the app is running, as well as the event handlers that can change those variables.
State may be modified in response to things like user input like clicking a button, or in response to events like loading a page.
State vars can be bound to component props, so that the UI always reflects the current state of the app.