Search Input Summary

BpkSearchInputSummary

Maven Central Class reference Source code

Default

Day Night
BpkSearchInputSummary component showing states including icon, text prefix with and without text entered BpkSearchInputSummary component showing states including icon, text prefix with and without text entered - dark mode

Installation

Backpack Compose is available through Maven Central. Check the main Readme for a complete installation guide.

Usage

Example of a BpkSearchInputSummary showing a text prefix before the search query:


                                                
                                                import net.skyscanner.backpack.compose.searchinputsummary.BpkSearchInputSummary
                                                import net.skyscanner.backpack.compose.textfield.BpkClearAction
                                                
                                                BpkSearchInputSummary(
                                                    inputText = inputText,
                                                    inputHint = inputHint,
                                                    prefix = Prefix.Text("Some text"),
                                                    onInputChanged = {/* update input*/ },
                                                    clearAction = BpkClearAction(stringResource(id = R.string.text_field_clear_action_description)) {/* clear input*/ },
                                                )

Example of a BpkSearchInputSummary showing an icon before the search query:


                                                
                                                import net.skyscanner.backpack.compose.searchinputsummary.BpkSearchInputSummary
                                                import net.skyscanner.backpack.compose.textfield.BpkClearAction
                                                
                                                BpkSearchInputSummary(
                                                    inputText = inputText,
                                                    inputHint = inputHint,
                                                    prefix = Prefix.Icon(BpkIcon.Hotels),
                                                    onInputChanged = {/* update input*/ },
                                                    clearAction = BpkClearAction(stringResource(id = R.string.text_field_clear_action_description)) {/* clear input*/ },
                                                )