Answer.Input
The Answer.Input component renders React Native's TextInput with the
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
The Answer.Input component renders React Native's TextInput with the
react-native-paper TextInputProps type and SDK placeholder styling.
Basic Example
import { Answer } from "@ovok/native";
import * as React from "react";
const BasicAnswerInput = () => (
<Answer.Input placeholder="Enter your response" />
);
export default BasicAnswerInput;Props
Every prop, with its type and description, is listed in the @ovok/native/journal API reference.
Component Behavior
Theme Integration
- Placeholder Color: Automatically uses
theme.colors.onSurfaceDisabledfor consistent muted text - Text Color: Uses the platform input's inherited text color unless the app supplies one
- Background: Uses the platform input's default background unless styled by the app
Styling
Default Styles
const styles = StyleSheet.create({
input: {
flex: 1,
},
});Theme Colors Used
theme.colors.onSurfaceDisabled- Placeholder text color
Related Components
- Answer - Parent container component
- Answer.Header - Header navigation component
- Answer.Question - Question display component
- Answer.Actions - Bottom action container
Last updated on
Answer.Header
The Answer.Header component provides a horizontal layout container for form navigation and action elements. It's designed to house back buttons, progress indicators, save actions, and other form-related controls at the top of journal entry screens.
Answer.Question
The Answer.Question component displays question text in journal and questionnaire forms. It provides consistent typography and styling for question prompts with emphasis on readability and accessibility.