Skip to content

Button.Transaction

Import

import { Button } from 'frog'

Usage

import { Button, Frog } from 'frog'
 
export const app = new Frog({ title: 'Frog Frame' })
 
app.frame('/', (c) => {
  return c.res({
    image: (
      <div style={{ color: 'white', display: 'flex', fontSize: 60 }}>
        Perform a transaction
      </div>
    ),
    intents: [
      <TextInput placeholder="Value (ETH)" />,
      <Button.Transaction target="/mint">Mint</Button.Transaction>,
    ]
  })
})

Props

action (optional)

  • Type: string

Path of the next frame to perform a POST request. Farcaster Frames Specification refers to it as a post_url property of that button.

target

  • Type: string

The target .transaction endpoint.