Skip to content

Input

Input fields allow users to enter and edit text. They’re used for forms, search, and any text-based interaction.


<Input placeholder="What guidance do you seek?" />
<Input
placeholder="What guidance do you seek?"
value={question}
onChangeText={setQuestion}
/>
Please enter a valid question
<Input
value={question}
error="Please enter a valid question"
/>
<Input placeholder="Disabled input" disabled />

SizeHeightFont SizeUsage
sm36px13pxCompact forms, filters
md44px15pxDefault, most cases
lg52px17pxPrimary inputs, search

Be specific and open-minded
<Input
label="Your Question"
placeholder="What would you like to know?"
hint="Be specific and open-minded"
/>

<Input
multiline
numberOfLines={4}
placeholder="Describe your situation in detail..."
/>

🔍
<Input
icon={<SearchIcon />}
iconPosition="left"
placeholder="Search hexagrams..."
/>

PropTypeDefaultDescription
valuestring-Input value
placeholderstring-Placeholder text
labelstring-Label above input
hintstring-Helper text below input
errorstring-Error message
size'sm' | 'md' | 'lg''md'Input size
disabledbooleanfalseDisable input
multilinebooleanfalseEnable textarea mode
numberOfLinesnumber1Lines for multiline
iconReactNode-Icon element
iconPosition'left' | 'right''left'Icon placement
onChangeText(text: string) => void-Text change handler
onFocus() => void-Focus handler
onBlur() => void-Blur handler
import { input } from '@synchronicity/tokens/components';
// Background per theme
input.background.light // #faf8f3
input.background.dark // #12121a
input.background.trueBlack // #000000
// Text
input.text.light // #1a1814
input.text.dark // #f8f9fa
// Placeholder
input.placeholder.light // #8c8579
input.placeholder.dark // #6c757d
// Border
input.border.color.default.dark // #24242f
input.border.color.focus // #d4af37
input.border.color.error // #ef4444
input.border.radius // 8

  • Use clear, descriptive placeholders
  • Provide labels for important fields
  • Show validation errors clearly
  • Use appropriate input types (email, number, etc.)
  • Use placeholder as the only label
  • Show error before user interacts
  • Make inputs too wide for their content
  • Require specific formats without examples

  • Label association: Labels are programmatically linked to inputs
  • Error announcement: Screen readers announce errors
  • Focus indicator: 2px gold outline
  • Touch target: Minimum 44px height
  • Placeholder contrast: 4.5:1 minimum
<Input
label="Your Question"
accessibilityLabel="Enter your question for the I Ching reading"
accessibilityHint="Type the question you want guidance on"
error={error}
/>

import { Input, Button } from '@synchronicity/react-native';
import { useState } from 'react';
function QuestionForm({ onSubmit }) {
const [question, setQuestion] = useState('');
const [error, setError] = useState('');
const handleSubmit = () => {
if (question.trim().length < 10) {
setError('Please enter a more detailed question');
return;
}
setError('');
onSubmit(question);
};
return (
<View style={styles.form}>
<Input
label="Your Question"
placeholder="What guidance do you seek today?"
hint="Be specific and reflect on what matters most"
value={question}
onChangeText={setQuestion}
error={error}
multiline
numberOfLines={3}
size="lg"
/>
<Button
variant="primary"
onPress={handleSubmit}
disabled={!question.trim()}
style={{ marginTop: 16 }}
>
Cast Hexagram
</Button>
</View>
);
}