Jenga Search Trigger
fun JengaSearchTrigger(placeholder: String, onClick: () -> Unit, modifier: Modifier = Modifier, trailingContent: @Composable () -> Unit? = null, shape: Shape = JengaTheme.components.searchTrigger?.shape ?: JengaSearchFieldDefaults.shape, colors: JengaTextFieldColors = JengaTheme.components.searchTrigger?.colors ?: JengaTextFieldDefaults.colors(), textStyle: TextStyle = JengaTheme.components.searchTrigger?.textStyle ?: JengaTextFieldDefaults.textStyle, minHeight: Dp = JengaTheme.components.searchTrigger?.minHeight ?: JengaTextFieldDefaults.minHeight, contentPadding: PaddingValues = JengaTheme.components.searchTrigger?.contentPadding ?: JengaTextFieldDefaults.contentPadding)(source)
A button that looks like a JengaSearchField, for entry points that open a search screen or mode instead of taking text in place. The trailingContent slot (e.g. a scan button) handles its own clicks.
Parameters
placeholder
the hint text shown in the trigger.
on Click
called when the trigger is tapped.
modifier
the Modifier for this trigger.
trailing Content
optional end slot.
shape
the trigger shape; defaults to the theme's search trigger style, else JengaSearchFieldDefaults.shape.
colors
the color set; reads the container, border, placeholder and icon colors.
text Style
the placeholder text style.
min Height
the minimum height of the trigger.
content Padding
padding inside the trigger.
Samples
JengaSearchTrigger(
placeholder = "Search tickets",
onClick = {},
trailingContent = {
JengaIcon(
imageVector = JengaIcons.QrCode,
contentDescription = "Scan",
)
},
)Content copied to clipboard