Dynamically update element based on radio option

I have a radio element and a text box element in my dash application. I’d like to update the text the field based on the selected option from a callback.


dbc.InputGroup(
                    [

                       dbc.RadioItems(
                                      id="type",
                                      persistence=True,
                                      persistence_type="memory",
                                      options=[
                                        {"label": "option1", "value": "option1"},
                                        {"label": "option2", "value": "option2"}
                                        ],
                                        value="option1",
                                        style={"margin-left":"8px"}
                       ),

                 ],
                 style={"margin-top":"20px","width": "80%", "float": "left"},
                ),



dbc.InputGroup(
                   [

               

                       dbc.InputGroupAddon("Floor", style={"margin-left":"8px"}),
                       dbc.Input(
                                 id="floor",
                                 persistence=True,
                                 persistence_type="memory"
                                ),

                   ],
                  
),

I’d like the text “Floor” to be dynamic based on the option selected in the radio button.