Skip to content

Corner Button

A clipped corner floods the button with colour as its arrow turns.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import CornerButton from "./CornerButton";
export default function Example() {
return (
<CornerButton
children={"Explore the details"}
color={"#d9ba94"}
background={"#29221e"}
inkColor={"#f2e4d2"}
disabled={false}
/>
);
}

Using Corner Button

Supply an action label through children and connect onClick to the intended action. Use type to control its behaviour inside a form.

The active prop lets you show the highlighted treatment independently of hover. Use disabled when the action is unavailable.

Props

NameTypeRequiredDefaultDescription
childrenReactNodeNoundefinedButton content.
colorstringNo"#dcc7ab"Corner and expanded fill colour.
backgroundstringNo"#242021"Initial background and expanded text colour.
inkColorstringNo"#f0e6d9"Initial label colour.
activebooleanNofalseOptional forced expanded appearance; hover and focus also expand the fill.
disabledbooleanNofalseNative disabled state.
typestringNo"button"Native button type: button, submit, or reset.
onClickfunctionNoundefinedNative click handler. Other native button and accessibility props are forwarded.
classNamestringNo""Additional classes merged with component styles.
styleCSSPropertiesNoundefinedInline styles for caller-defined sizing, typography, and appearance.

Related components

An action label contracts into a circular loader and resolves to a checkmark.

Alternating shutters close into a solid button face on hover or focus.

A raised rubber-stamp button leaves a fading outline when pressed.

A sculpted keycap compresses into its base with a satisfying press.