Button

A button for on-page interactions, typically in forms.

It implements the <button> element.

It automatically has the disabled attribute until mounted, to prevent a default action from happening if the user clicks quickly after SSR.

Note: Links are semantically different and have separate, distinctly styled components.

Styles

Import the styles within a Next.js custom app in pages/_app.js.
import "device-agnostic-ui/Button.css";

Props

Use any valid <button> props.

Examples

How to import.
import Button from "device-agnostic-ui/Button.mjs";
Simple button.
import Button from "device-agnostic-ui/Button.mjs";

const result = <Button>Label</Button>;
Disabled button.
import Button from "device-agnostic-ui/Button.mjs";

const result = <Button disabled>Label</Button>;

Tags