FillButton

Components/Form/Swatches/FillButton

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/fillbutton

Overview

Copy

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.

Do

  • Use it to add a new swatch to the list of colors or gradients.
  • Use it to call out the color picker popover.
  • Use it to call out Media Manager to pick an image.

Don't

  • Don't use it as a standalone element. It should be accompanied by a list of <FillPreview/> elements or be a part of <Swatches/>.

Feature examples

Icon size

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.

Copy

Fill

Set the button's fill-in HEX color or linear gradient. Component allows control of the gradient direction.

Copy

Disabled

Restrict button interactions with `disabled` prop. This will prevent users from adding a new swatch.

Copy

Tooltip

Explain the action with a message in a tooltip. Control the tooltip position and behaviour by passing relevant properties via `tooltipProps`.

Copy

Icon

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.

Copy

Common use case examples

Adding custom swatch

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.

Copy

Code

Copy

Props

NameTypeDefaultDescription
dataHookstring—Applies a data-hook HTML attribute that can be used in the tests.
disabledboolean—Specify whether button should be disabled or not.
fillstring—Defines button fill value in string format. Accepts HEX colors and gradients.
iconReactNode—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.
onClickMouseEventHandler—Defines a callback handler. Handler is called whenever a button is clicked.
tooltipContentReactNode—Specifies a message to display on button hover.
tooltipPropsTooltipCommonProps—Allows to pass tooltip common props.

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
clickclicks on trigger element
getTooltipTextGets the tooltip text
existsChecks whether the component found with the given data hook.
elementGets the component root element.
baseReturns UniDriver for the base element.

Changelog

  • 1.340.0 (2026-10-21) — maintenance release, no component-specific changes
  • 1.339.0 (2026-10-19) — maintenance release, no component-specific changes
  • 1.338.0 (2026-10-15) — maintenance release, no component-specific changes
  • 1.330.1 (2026-09-28) — maintenance release, no component-specific changes
  • 1.330.0 (2026-09-28) — maintenance release, no component-specific changes
  • 1.329.0 (2026-09-24) — maintenance release, no component-specific changes
  • 1.325.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.323.0 (2026-09-10) — maintenance release, no component-specific changes
  • 1.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.291.0 (2026-06-19) — maintenance release, no component-specific changes
  • 1.273.0 (2026-04-30) — maintenance release, no component-specific changes
  • 1.271.0 (2026-04-22) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.260.0 (2026-03-17) — maintenance release, no component-specific changes
  • 1.247.2 (2026-01-21) — maintenance release, no component-specific changes
  • 1.246.0 (2026-01-09) — maintenance release, no component-specific changes
  • 1.243.0 (2025-12-23) — maintenance release, no component-specific changes
  • 1.242.0 (2025-12-19) — maintenance release, no component-specific changes
  • 1.241.0 (2025-12-17) — maintenance release, no component-specific changes
  • 1.220.0 (2025-09-29) — fix: add cursor
    to FillButton when enabled (#15345)
  • 1.216.0 (2025-09-01) — breaking: e3 tokenization (#15252)
  • 1.212.0 (2025-08-11) — maintenance release, no component-specific changes
  • 1.166.0 (2025-03-04) — maintenance release, no component-specific changes
  • 1.145.0 (2024-12-09) — breaking: tokenize (#14086)
  • 1.138.1 (2024-10-30) — maintenance release, no component-specific changes
  • 1.104.0 (2024-05-06) — fix: fix submitting form on click (#13687)
  • 1.102.0 (2024-04-16) — maintenance release, no component-specific changes
  • 1.92.1 (2024-02-05) — maintenance release, no component-specific changes

Last updated: 22 October 2026

Did this help?