Skip to content

Frog.composerAction Response

The response returned from the .composerAction handler.

import { Frog } from 'frog'
 
export const app = new Frog({ title: 'Frog Frame' })
 
app.composerAction('/', (c) => {
    return c.res({
      // ...
    })
  },
  { /* options */ }
)

title

  • Type: string

Title of your action which will be shown in the footer of the Composer Form.

/** @jsxImportSource frog/jsx */
// ---cut---
import { Button, Frog } from 'frog'
 
export const app = new Frog({ title: 'Frog Frame' })
 
app.composerAction('/', (c) => {
    return c.res({
      title: 'My Composr Action',
      url: 'https://example.com'
    })
  },
  { /* options */ }
)
## Errors were thrown in the sample, but not included in an error tag These errors were not marked as being expected: 2345. Expected: // @errors: 2345 Compiler Errors: index.tsx [2345] 289 - Argument of type '{}' is not assignable to parameter of type 'RouteOptions<"composerAction", Env, "/", BlankInput>'.

url

  • Type: string

Composer Form URL. Must be http:// or https:// protocol.

/** @jsxImportSource frog/jsx */
// ---cut---
import { Button, Frog } from 'frog'
 
export const app = new Frog({ title: 'Frog Frame' })
 
app.composerAction('/', (c) => {
    return c.res({
      title: 'My Composr Action',
      url: 'https://example.com'
    })
  },
  { /* options */ }
)
## Errors were thrown in the sample, but not included in an error tag These errors were not marked as being expected: 2345. Expected: // @errors: 2345 Compiler Errors: index.tsx [2345] 289 - Argument of type '{}' is not assignable to parameter of type 'RouteOptions<"composerAction", Env, "/", BlankInput>'.