Skip to main content

Button

Buttons help people take actions and make choices with a single tap. Follows the Material Design 3 Button specification.

Usage

import { Button } from '@onlynative/components/button'

<Button variant="filled" onPress={() => console.log('pressed')}>
Save
</Button>

Variants

VariantUse case
filledPrimary action, highest emphasis
elevatedElevated surface, medium emphasis
outlinedSecondary action, medium emphasis
textLow emphasis, often in dialogs
tonalSecondary container fill

With Icons

<Button leadingIcon="plus" onPress={() => {}}>Add Item</Button>
<Button trailingIcon="arrow-right" onPress={() => {}}>Continue</Button>

Disabled

<Button disabled onPress={() => {}}>Disabled</Button>

Props

No props found for Button.