Argent

Button

Starts an action.

import { Button } from '@rajatweb/argent'

<Button onClick={save}>Save changes</Button>
<Button variant="outline">Cancel</Button>
<Button variant="danger" loading>Delete</Button>

Props

PropTypeDefaultWhat it does
disabledboolean
fullWidthbooleanFills the width of its container.
loadingbooleanShows a spinner and ignores presses.
size'sm' | 'md' | 'lg''md'
variant'danger' | 'solid' | 'outline' | 'ghost''solid'

Accessibility

  • Loading keeps focus and announces that it is busy.
  • Small buttons still reach a 44-point target on React Native.

Do

  • Use one solid button per view.
  • Name the action: "Delete project".

Don’t

  • Use danger for anything that can be undone.