Skip to main content

Overview

The Text component displays text content. Uniwind provides className prop support for styling this component.

Styling Convention

For style props: Use regular Tailwind classes directly (e.g., className="p-4").For non-style props (like selectionColor): Use the accent- prefix (e.g., selectionColorClassName="accent-bg-blue-500").

Uniwind Bindings

className
string
Maps to the style prop. Use any Tailwind utility classes.
selectionColorClassName
string
Maps to the selectionColor prop. Requires accent- prefix for color values.

Usage Example

import { Text } from 'react-native'

<Text
  className="text-lg font-bold text-gray-900 dark:text-white"
  selectionColorClassName="accent-bg-blue-500"
>
  Hello World
</Text>
I