GuidesComponentsjournal

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.onSurfaceDisabled for 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

Last updated on

On this page