Minimal
Left aligned, no Cancel button, no animation.
How it works
Section titled “How it works”showCancelButton={false}keeps the input at full width.placeholderAlign="left"rests the icon and the placeholder at the leading edge.animated={false}turns the animation off.
Uses
Full source
Section titled “Full source”This is the code running in the phone. Copy it into your app.
import { useState } from 'react';import { StyleSheet, Text, View } from 'react-native';import Search from 'react-native-search-box';
export default function Minimal() { const [query, setQuery] = useState('');
return ( <View style={styles.screen}> <Text style={styles.title}>Notes</Text> <Search showCancelButton={false} placeholderAlign="left" animated={false} backgroundColor="transparent" placeholder="Search notes" inputHeight={40} inputStyle={styles.input} searchIconExpandedMargin={18} placeholderExpandedMargin={34} onChangeText={setQuery} onDelete={() => setQuery('')} /> <Text style={styles.text}>{query ? `Notes about “${query}”` : 'All notes'}</Text> </View> );}
const styles = StyleSheet.create({ screen: { flex: 1, backgroundColor: '#fff', padding: 16 }, title: { fontSize: 28, fontWeight: '700', color: '#111', marginBottom: 8, marginLeft: 5 }, input: { fontSize: 16, color: '#111', backgroundColor: '#fff', borderWidth: 1, borderColor: '#d1d5db', borderRadius: 8, }, text: { marginTop: 16, marginLeft: 5, color: '#6b7280' },});