FillButton

The fill floods in from the edge your pointer entered and drains out through the edge it left by. Buttons.

Open playground

About

FillButton is a React component in the Buttons category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { FillButton } from "@ashutoshswamy/smoui" and set children, onClick.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { FillButton } from "@ashutoshswamy/smoui";

<FillButton onClick={start}>Start a project</FillButton>

Props 2

children

Button content. Shown twice, once per fill state.

ReactNode
onClick

Click handler.

() => void