Skip to main content

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.

Basic Example​

import { Answer } from "@ovok/native";
import * as React from "react";
import { Text } from "react-native-paper";

const BasicAnswerQuestion = () => (
<Answer.Question>How are you feeling today?</Answer.Question>
);

export default BasicAnswerQuestion;

Props​

Extends TextProps<"bodyLarge"> from react-native-paper.

Primary Props​

PropTypeDefaultDescription
styleStyleProp<TextStyle>undefinedAdditional styles to apply to the question text
childrenReactNodeundefinedThe question text content to display

Inherited Props​

All Text component props from react-native-paper are supported:

  • variant (default: "bodyLarge")
  • numberOfLines
  • testID
  • accessibilityLabel
  • accessibilityRole

Styling​

Default Styles​

const styles = StyleSheet.create({
question: {
fontSize: 18,
fontWeight: "600",
},
});

Theme Integration​

Uses react-native-paper default text colors from the theme system.