Skip to content

Button

Button(props): null | ReactElement<any, string | JSXElementConstructor<any>>

Buttons are controls that let users take actions and confirm choices.

Button

Parameters

ParameterType
propsButtonProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>

Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Param

See

Examples

A Button can render as a standard <button> element:

import { Button } from "@netlify/sdk/react/components";
<Button onClick={() => console.log("Clicked!")}>Click me!</Button>

A Button can also render as a link (<a>) element:

import { Button } from "@netlify/sdk/react/components";
<Button href="https://www.google.com/">Google</Button>