---
title: Styling a React Native button
sidebar_title: Styling buttons
---
import ImageSpotlight from '~/components/plugins/ImageSpotlight';
import { SnackInline} from '~/ui/components/Snippet';
React Native exports a [``](/versions/latest/react-native/button/) component that exposes the native button element for Android, iOS, and the web.
The `` component accepts `title` and `onPress` props but it does not accept a `style` prop, which makes it hard to customize the style.
The closest we can get to styling a `` exported from React Native is with the `color` prop. Below is an example of two buttons on Android, iOS, and the web.
The first button is the default `` and the second is another default `` with its `color` prop set to `"red"`.
To create a button with a custom style, we can to turn to the [``](/versions/latest/react-native/pressable/) component.
`` lets us fully customize the appearance of a pressable element (like a button), in addition to allowing us to customize its behavior.
Here's an example of using`` to create a button component:
{/* prettier-ignore */}
```jsx
import React from 'react';
import { Text, View, StyleSheet, Pressable } from 'react-native';
export default function Button(props) {
const { onPress, title = 'Save' } = props;
return (
{title}
);
}
const styles = StyleSheet.create({
button: {
alignItems: 'center',
justifyContent: 'center',
paddingVertical: 12,
paddingHorizontal: 32,
borderRadius: 4,
elevation: 3,
backgroundColor: 'black',
},
text: {
fontSize: 16,
lineHeight: 21,
fontWeight: 'bold',
letterSpacing: 0.25,
color: 'white',
},
});
```
And here's the result of this code:
React Native's `` component does not accept a `style` prop, and its `color` prop is limited and appears differently across Android, iOS, and the web.
With the `` component, we can create custom buttons that fit our app's design. Those styles will also be the same across Android, iOS, and the web,
which will give our apps a consistent look on every platform.