Components/Form/Swatches/FillButton
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/fillbutton
Fill button allows to add a new color swatch to an existing list of options. It's used as a building part for <Swatches/> component.
<FillPreview/> elements or be a part of <Swatches/>.Control plus icon size inside of a button:
 - `small` (default) - use it when the button's width is 30 pixels or smaller.
 - `medium` - use it when the button's width is larger than 30 pixels.
Set the button's fill-in HEX color or linear gradient. Component allows control of the gradient direction.
Restrict button interactions with `disabled` prop. This will prevent users from adding a new swatch.
Explain the action with a message in a tooltip. Control the tooltip position and behaviour by passing relevant properties via `tooltipProps`.
Display a custom icon inside of a button using icon prop.
Default icon is a plus and is displayed all the time unless specified otherwise.
Overridden icon size cannot be controlled using `iconSize` property. Size has to be controlled manually.
Use a fill button to add new fill options to the existing list. It's recommended to place it as the first item on the list, because it won't be moved down when new colors appear, letting the user always find it.
It can be used with <FileUpload/> to open a native file picker to upload images.
| Name | Type | Default | Description |
|---|---|---|---|
dataHook | string | — | Applies a data-hook HTML attribute that can be used in the tests. |
disabled | boolean | — | Specify whether button should be disabled or not. |
fill | string | — | Defines button fill value in string format. Accepts HEX colors and gradients. |
icon | ReactNode | — | Overrides the default plus icon with any Wix Design System icon. This doesn't work together with iconSize, so control the icon size manually. |
iconSize | "small" | "medium" | 'small' | Controls the size of a plus icon. |
onClick | MouseEventHandler | — | Defines a callback handler. Handler is called whenever a button is clicked. |
tooltipContent | ReactNode | — | Specifies a message to display on button hover. |
tooltipProps | TooltipCommonProps | — | Allows to pass tooltip common props. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
click | clicks on trigger element |
getTooltipText | Gets the tooltip text |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
base | Returns UniDriver for the base element. |
Last updated: 22 October 2026