Skip to main content

TodayQuestionCard

The TodayQuestionCard component displays daily questions and prompts in an interactive card format with gradient background support. It's designed for engaging daily health check-ins, questionnaires, and journal prompts with visual appeal and clear call-to-action elements.

Basic Example

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

const BasicTodayQuestionCard = () => (
<TodayQuestionCard>
<TodayQuestionCard.Gradient colors={["#1a1a21", "#1a1a21", "#1a1a21"]}>
<TodayQuestionCard.Title>Daily Check-in</TodayQuestionCard.Title>
<TodayQuestionCard.Question>
How are you feeling?
</TodayQuestionCard.Question>
<TodayQuestionCard.Actions>
<IconButton icon="refresh" />
<IconButton icon="arrow-right" />
</TodayQuestionCard.Actions>
</TodayQuestionCard.Gradient>
</TodayQuestionCard>
);

export default BasicTodayQuestionCard;

Props

Extends CardProps from react-native-paper, excluding the elevation prop.

Primary Props

PropTypeDefaultDescription
childrenReactNodeundefinedContent to display within the card
styleStyleProp<ViewStyle>undefinedAdditional styles to apply to the card
contentStyleStyleProp<ViewStyle>undefinedStyles for the card's content container

Inherited Props

All Card component props except elevation:

  • mode (default: "contained")
  • onPress
  • disabled
  • accessibilityLabel
  • accessibilityRole

Compound Components

Component Behavior

Card Design

  • Mode: Uses "contained" mode for Material Design 3 elevation
  • Background: Automatically applies theme.colors.surface background
  • Gradient Support: Designed to work with gradient backgrounds for visual appeal

Theme Integration

  • Surface Color: Uses theme surface color as base
  • Component Colors: Child components use appropriate theme colors
  • Responsive Design: Adapts to different screen sizes and orientations

Styling

Theme Colors Used

  • theme.colors.surface - Card background color