Skip to content
PixiKit

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
NameTypeDefaultDescription
labelstring"Get started"The label as plain text.
childrenReactNodeNoneCustom label content; replaces `label`.
hrefstringNoneRenders 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.
colorsstring[]DEFAULT_COLORSThe colours that drift through the pill, one blob each.
baseColorstring"var(--foreground)"The colour under the blobs and of the cover that leaves only the rim.
textColorstring"var(--background)"Label colour.
borderWidthnumber2Rim thickness of the border variant, and border width of the outline variant, in px.
blobSizenumber100Diameter of each colour blob, in px.
blurnumber12Blur of the blobs, in px.
rangenumber100How far a blob may drift from the centre, in px.
speednumber2Seconds a blob takes to reach its next spot.
hoverDurationnumber0.5Seconds the cover takes to fade in or out on hover.
heightnumber46Button height, in px.
paddingXnumber25Space left and right of the label, in px.
radiusnumber25Corner radius, in px.
fontSizenumber15Label size, in px.
sheenbooleantrueA soft light across the right side of the pill.
outlineColorstring"var(--border)"Border colour of the outline variant at rest.
outlineHoverColorstring"var(--foreground)"Text colour of the outline variant, and its border colour on hover and focus.
fullWidthbooleanfalseStretches the button to its container's width.
pausedbooleanfalseStops the colours where they are.
disabledbooleanfalse
type"button" | "submit" | "reset""button"
ariaLabelstringNone
onClick(event: MouseEvent<HTMLElement>) => voidNone
classNamestring""
styleCSSPropertiesNone

More interaction components in Pro

View all

Related