Skip to content

Button

const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>

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

Button

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>