Skip to main content

Button

Button triggers an action when pressed. It supports multiple appearances, statuses, sizes, and accessory slots for icons.

Import

import { Button } from '@ui-kitten/components';

Basic Usage

import React from 'react';
import { Layout, Button, Icon } from '@ui-kitten/components';

const ButtonExample = () => (
<Layout style={{ flex: 1, padding: 16, gap: 8 }}>
<Button onPress={() => console.log('Pressed')}>
Default Button
</Button>

<Button appearance="outline" status="success">
Success Outline
</Button>

<Button
appearance="ghost"
status="danger"
size="small"
accessoryLeft={(props) => <Icon {...props} name="trash-2" />}
>
Delete
</Button>
</Layout>
);

Props

PropertyTypeDefaultDescription
appearance'filled' | 'outline' | 'ghost''filled'Visual style variant.
status'primary' | 'success' | 'info' | 'warning' | 'danger' | 'basic' | 'control''primary'Semantic color applied to the button.
size'tiny' | 'small' | 'medium' | 'large' | 'giant''medium'Size of the button.
accessoryLeft(props) => ReactElementundefinedRender function for the left accessory (e.g., icon).
accessoryRight(props) => ReactElementundefinedRender function for the right accessory (e.g., icon).
disabledbooleanfalseWhether the button is disabled.
onPress() => void-Called when the button is pressed.
childrenReactText | (props) => ReactElementundefinedButton label text or render function.

Button also accepts all standard React Native TouchableOpacity props.

Storybook

Live examples coming soon via Storybook.