Components/Actions
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/additem
Add item component allows users to add a new item to an existing list.
<FileUpload/> mechanism to add a new file to a list.<Button/> or <TextButton/> instead.Control the size of a component with size prop:
large - use when item height is >212 px.medium - use when item height is between 162 px and 212 px.small - use when item height is between 120 px and 162 px.tiny (default) - use when item height is between 48 px and 120 px.size prop affects component's padding and icon size. Its height and width also depend on a parent container.
Minimum height of a component is:
dashes,plain, andimage themes.Control the style of a component with theme prop:
dashes (default) - use it outside of a card, in a table or a list that contains images.plain - use for in-card lists and tables that mainly consist of text.filled - use for small in-card items, when a prominent call to action is needed.image - use to add images inside a card.Control content alignment with alignItems prop:
leftcenter (default)rightUse left alignment with a plain component theme to maintain visual consistency with a remaining list inside a card.
Control whether a component has padding with removePadding prop.
Use it in special cases only, when component is used in dense and narrow layouts.
Control the border radius of a component with borderRadius prop.
By default, component has a corner radius of 8 px. Change it in custom scenarios, for example, when user needs to add a round avatar photo.
Emphasize action with a title.
If no title is shown, display it in a tooltip on item hover with tooltipContent prop.
Add a description below the title using subtitle prop.
Use it to explain item details, such as a supported file format of a maximum allowed file size.
Control where the subtitle appears with subtitlePlacement prop:
bottom (default) - shows the subtitle below the title.top - shows the subtitle above the title. Use it when the description explains the action, and the title reads as the action itself.Line up the text of items placed side by side by giving every item an icon of the same height.
An illustration passed as a source string is always rendered at a fixed size. Wrap a custom icon in a box of that size, for example 60×60 px for a small item.
Control a '+' icon visibility with showIcon prop. The icon is always shown by default.
Override a default '+' icon with a custom icon or illustration by passing it to icon prop.
Align dimensions of the icon or illustration based on add item size:
large and medium size components.small size component.tiny size component.Disable all component interactions with disabled prop. Use it to show that no new item can be added to the list at a moment.
Describe add item action with tooltipContent. Tooltip is shown when users hover on the item with a mouse.
Control tooltip design with tooltipProps.
Use Add item to create a new item inside a card.
When the list consists mainly of textual content, use plain theme and adjust component's alignment.
Use Add item's dashed theme when component is placed directly inside of a <Page/> layout.
Use Add item to upload images.
For this, select image theme and show the title inside a tooltip on mouse hover.
| Name | Type | Default | Description |
|---|---|---|---|
alignItems | "center" | "right" | "left" | 'center' | Controls the horizontal alignment of the content. |
ariaDescribedBy | string | — | Defines the ID of the element that describes the add item element. |
ariaLabel | string | — | Defines a string value that labels the add item element. |
ariaLabelledBy | string | — | Defines the ID of the element that labels the add item element. |
borderRadius | string | number | string & {} | — | Sets the border-radius CSS property of the button element. |
children | ReactNode | (() => ReactNode) | — | Accepts any renderable node or a render function to display as the content. Text styles aren't applied to the output of a render function. |
dataHook | string | — | Applied as data-hook HTML attribute that can be used to create driver in testing. |
disabled | boolean | — | Specifies whether the component is disabled. |
icon | ReactNode | — | The illustration icon src or node. |
onClick | MouseEventHandler | — | Defines a callback function which is called when the component is clicked. |
ref | null | string | (instance: AddItemActions | null) => void | RefObject<AddItemActions> | — | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). |
removePadding | boolean | false | Specifies whether to remove the padding around the content. |
showIcon | boolean | true | Displays the plus icon. |
size | "small" | "tiny" | "medium" | "large" | 'tiny' | Controls the size of the icon, text and spacing. |
skin | "image" | "dashes" | "plain" | "filled" | 'dashes' | Controls the visual style of the component. |
subtitle | ReactNode | — | Subtitle of the component. |
subtitlePlacement | "top" | "bottom" | 'bottom' | Sets whether the subtitle shows below or above the title. With top, the subtitle shows between the icon and the title, except at tiny size, where the icon sits beside the title and the subtitle shows directly above the title. |
theme | "image" | "dashes" | "plain" | "filled" | — | Controls the visual style of the component. |
tooltipContent | ReactNode | — | When provided, hovering displays a tooltip. |
tooltipProps | TooltipCommonProps | — | Tooltip props. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
getText | Gets AddItem text |
textExists | Checks whether AddItem text exist |
getTooltipContent | Gets tooltip text |
getSubtitle | Gets AddItem subtitle |
isFocused | Checks whether AddItem is focused |
focus | Sets focus on the element |
blur | Removes focus on the element |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
subtitlePlacement prop. Set it to top to show the subtitle above the title; the default bottom keeps the current layout. (#17596) — has visual changesariaLabelledBy and ariaDescribedBy now reach the button as aria-labelledby and aria-describedby, so screen readers announce the label and description you point them at. With a tooltip, the button is described by both your element and the tooltip. (#17291)Last updated: 26 October 2026