Fluid Button
A pill button whose fill is a handful of blurred colours that never stop drifting. On hover a fill pulls back to a thin moving rim, and a rim floods into a full fill.
pixikit.com/docs/components/fluid-button
Customize
Variant
Hover effect
Colors6 of 10
Base color
Text color
Border width2.0px
Blob size100px
Blur12px
Range100px
Speed2.0s
Hover duration0.50s
Height46px
Padding x25px
Radius25px
Font size15.0px
Sheen
Outline color
Outline hover color
Full width
Paused
Disabled
Props
29| Name | Type | Default | Description |
|---|---|---|---|
label | string | "Get started" | The label as plain text. |
children | ReactNode | None | Custom label content; replaces `label`. |
href | string | None | Renders a link instead of a button. |
variant | "fill" | "border" | "outline" | "fill" | `fill` shows the moving colours across the whole pill, `border` only as a thin rim, `outline` is a plain bordered pill. |
hoverEffect | "swap" | "none" | "swap" | What hover does: `swap` turns a fill into a rim and a rim into a fill, `none` leaves it alone. |
colors | string[] | DEFAULT_COLORS | The colours that drift through the pill, one blob each. |
baseColor | string | "var(--foreground)" | The colour under the blobs and of the cover that leaves only the rim. |
textColor | string | "var(--background)" | Label colour. |
borderWidth | number | 2 | Rim thickness of the border variant, and border width of the outline variant, in px. |
blobSize | number | 100 | Diameter of each colour blob, in px. |
blur | number | 12 | Blur of the blobs, in px. |
range | number | 100 | How far a blob may drift from the centre, in px. |
speed | number | 2 | Seconds a blob takes to reach its next spot. |
hoverDuration | number | 0.5 | Seconds the cover takes to fade in or out on hover. |
height | number | 46 | Button height, in px. |
paddingX | number | 25 | Space left and right of the label, in px. |
radius | number | 25 | Corner radius, in px. |
fontSize | number | 15 | Label size, in px. |
sheen | boolean | true | A soft light across the right side of the pill. |
outlineColor | string | "var(--border)" | Border colour of the outline variant at rest. |
outlineHoverColor | string | "var(--foreground)" | Text colour of the outline variant, and its border colour on hover and focus. |
fullWidth | boolean | false | Stretches the button to its container's width. |
paused | boolean | false | Stops the colours where they are. |
disabled | boolean | false | |
type | "button" | "submit" | "reset" | "button" | |
ariaLabel | string | None | |
onClick | (event: MouseEvent<HTMLElement>) => void | None | |
className | string | "" | |
style | CSSProperties | None |