Capítulo 92 de 147

Chapter 92: Color

Core Idea

Learn how to adjust the color of icons in your React Native application using the color prop or by using parent elements text color value.

Key Concepts

  • Adjust the color using the color prop

Code Examples

import React, {useState, useEffect} from 'react';
import { View } from 'react-native';
import { Smile } from "lucide-react-native";

const style = { height: '100%', alignItems: 'center', display: 'flex', justifyContent: 'center' }

const App = () => {
  return (
    <View style={style}>
      <Smile color="#3e9392" />
    </View>
  );
};

export default App;
  • What it demonstrates: Color usage pattern from the official Lucide docs.

Key Takeaways

  1. Adjust the color using the color prop

Connects To

  • React Native: part of the React Native section of the Lucide docs.
  • Lucide for React Native: overview page for this section.