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
| Prop | Type | Default | Description |
|---|---|---|---|
style | StyleProp<TextStyle> | undefined | Additional styles to apply to the question text |
children | ReactNode | undefined | The question text content to display |
Inherited Props
All Text component props from react-native-paper are supported:
variant(default:"bodyLarge")numberOfLinestestIDaccessibilityLabelaccessibilityRole
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.
Related Components
- Answer - Parent container component
- Answer.Header - Header navigation component
- Answer.Input - Text input component
- Answer.Actions - Bottom action container