Ark Logo

Changelog

All notable changes will be documented in this file.

[Unreleased]

Highlights

The 3.0 release brings significant enhancements and some breaking changes for a more streamlined and flexible API. Key updates include new components and types, improved form integration, and enhanced forward compatibility.

Added

  • Context Component: Introduced a Context component for easier access to internal machine APIs, improving component composition. See the example below:
export const Basic = () => (
  <Popover.Root>
    <Popover.Trigger>Open</Popover.Trigger>
    <Popover.Positioner>
      <Popover.Context>
        {(popover) => (
          <Popover.Content>
            <Popover.Title onClick={() => popover().setOpen(false)}>Title</Popover.Title>
            <Popover.Description>Description</Popover.Description>
          </Popover.Content>
        )}
      </Popover.Context>
    </Popover.Positioner>
  </Popover.Root>
)
  • Format: Added a Format component for formatting bytes and numbers.
<Format.Byte value={120904} unit="byte" unitDisplay="short" />
<Format.Number value={1204} unit="centimeter" />
  • Tooltip: Added defaultOpen prop for cases where you do not need to control its open state.
  • Types: Exported Assign and Optional types to enhance type handling.
    • Toast: Support for overlapping and stacked toast.

Changed

  • [BREAKING]: Exposed hidden inputs in Checkbox, ColorPicker, FileUpload, PinInput, RatingGroup, Select, Switch, and TagsInput for better form library compatibility. Please ensure to include the hidden input in your component like shown below:
<Checkbox.Root>
  <Checkbox.Label>Checkbox</Checkbox.Label>
  <Checkbox.Control>
    <Checkbox.Indicator>
      <CheckIcon />
    </Checkbox.Indicator>
  </Checkbox.Control>
  <Checkbox.HiddenInput />
</Checkbox.Root>
  • [BREAKING]: Made id optional and removed for from ItemGroupLabel in Combobox and Select for cleaner markup.
- <Combobox.ItemGroup id="framework">
-   <Combobox.ItemGroupLabel for="framework">Frameworks</Combobox.ItemGroupLabel>
+ <Combobox.ItemGroup>
+   <Combobox.ItemGroupLabel>Frameworks</Combobox.ItemGroupLabel>
  • [BREAKING] Popover, Tooltip: Rename closeOnEsc to closeOnEscape to be consistent with dialog machine
  • [BREAKING]: Renamed Environment to EnvironmentProvider to align with other providers.
  • Refined the as prop implementation for improved type merging and performance.
// before
<Button as={Dialog.Trigger} variant="solid" size="sm">
  Open Dialog
</Button>

// after
<Dialog.Trigger asChild={(props) => <Button {...props()} />}>
  Open Dialog
</Dialog.Trigger>

Fixed

  • DatePicker: Resolved issues with min and max props not supporting date strings.
  • Accordion: Fixed initial flicker of content.
  • TagsInput: Replaced HTMLInputElement with HTMLDivElement in TagsInput.Root.
  • Select, Combobox: Fixed an issue with reactivity.
  • Toast: Resolved an issue with Toast not updating its toasts and count properties when creating one or more toasts.
  • ColorPicker: Added missing HTMLArkProps<'div'> to ColorPicker.View.

Removed

  • [BREAKING]: Dropped direct internal API access from Root components. Use the new Context component for more flexible and cleaner API integration.
  • [BREAKING]: Simplified component APIs by removing dir and getRootNode attributes. Use LocaleProvider and EnvironmentProvider for these settings.

[3.0.0-7] - 2024-05-22

Added

  • Exported Assign and Optional types.

[3.0.0-6] - 2024-05-19

Changed

  • Renamed Environment to EnvironmentProvider for consistency with other providers.
  • Revised asChild prop

[3.0.0-5] - 2024-05-15

Added

  • Added support for default values like defaultOpen, defaultValue etc .

Changed

  • Integrated latest @zag-js.

Fixed

  • Fixed initial flicker of Accordion content

[3.0.0-4] - 2024-05-03

Fixed

  • Fixed an issue with reactivity in collection based components like Select or Combobox.

[3.0.0-3] - 2024-05-02

Changed

  • Exposed hidden inputs for various components like Checkbox, RadioGroup, PinInput, TagsInput, and NumberInput to allow for better integration with form libraries.

[3.0.0-2] - 2024-05-02

Removed

  • BREAKING: Removed dir and getRootNode from all components. Use Locale and Environment to set the direction and root node.

Changed

  • Made the id attribute optional for <Combobox.ItemGroup> and removed for from <Combobox.ItemGroupLabel>.
- <Combobox.ItemGroup id="framework">
-   <Combobox.ItemGroupLabel for="framework">Frameworks</Combobox.ItemGroupLabel>
+ <Combobox.ItemGroup>
+   <Combobox.ItemGroupLabel>Frameworks</Combobox.ItemGroupLabel>
  • Made the id attribute optional for <Select.ItemGroup> and removed for from <Select.ItemGroupLabel>.
- <Select.ItemGroup id="framework">
-   <Select.ItemGroupLabel for="framework">Frameworks</Select.ItemGroupLabel>
+ <Select.ItemGroup>
+   <Select.ItemGroupLabel>Frameworks</Select.ItemGroupLabel>

[3.0.0-1] - 2024-04-11

Fixed

  • Resolved an issue where the dist folder was not being published to npm.

[3.0.0-0] - 2024-04-10

Added

  • Exposed component-related types to keep imports clean and orderly.
import { Avatar } from '@ark-ui/react'

export const Example = () => {
  // New: Use `Avatar` import to declare types.
  const handleLoadingStatusChange = (details: Avatar.StatusChangeDetails) => {
    console.log(details.status)
  }

  return (
    <Avatar.Root onLoadingStatusChange={handleLoadingStatusChange}>
      <Avatar.Fallback>PA</Avatar.Fallback>
      <Avatar.Image src="https://i.pravatar.cc/300" alt="avatar" />
    </Avatar.Root>
  )
}
  • Added a Context component to allow access to the internal machine API. Previously, it was only possible to access the internal API at the root level, which is manageable for small components but could lead to cumbersome composition in larger components. Additionally, this pattern clashed with the asChild composition pattern we use.
export const Basic = () => (
  <Popover.Root>
    <Popover.Trigger>Open</Popover.Trigger>
    <Popover.Positioner>
      <Popover.Context>
        {(popover) => (
          <Popover.Content>
            <Popover.Title onClick={() => popover().close()}>Title</Popover.Title>
            <Popover.Description>Description</Popover.Description>
          </Popover.Content>
        )}
      </Popover.Context>
    </Popover.Positioner>
  </Popover.Root>
)
  • Added new Format component to format bytes and numbers.

Fixed

  • Resolved an issue with Toast not updating its toasts and count properties when creating one or more toasts.
  • Resolved an issue in DatePicker where the min and max props did not support date string values.

Changed

  • Refined the current as prop implementation. The previous approach had several issues, mostly related to the merging of multiple types (e.g., ButtonProps + DialogTriggerProps + HTMLButtonElement), which resulted in a sluggish and, in some cases, malfunctioning implementation.
// before
<Button as={Dialog.Trigger} variant="solid" size="sm">
  Open Dialog
</Button>

// after
<Dialog.Trigger asChild>
  {(props) => (
    <Button
      {...props({ onClick: () => console.log('merge events') })}
      variant="solid"
      size="md"
    >
      Open Dialog
    </Button>
  )}
</Dialog.Trigger>

Removed

  • BREAKING: Removed the option to access the internal API from various Root components. Use the new Context component instead. This change will help in streamlining the asChild composition pattern.
  • Removed the unused parse prop from the DatePicker component.

[2.2.0] - 2024-02-27

Added

  • Added Collapsible component.
  • Added new FormatByte and FormatNumber components.

Changed

  • Enhanced the performance of the Ark factory by utilizing memo to avoid unnecessary re-renders.
  • Integrated Collapsible into Accordion, allowing the Accordion component to utilize Collapsible for animating the opening and closing of content.d
@keyframes slideDown {
  from {
    height: 0;
  }
  to {
    height: var(--height);
  }
}

@keyframes slideUp {
  from {
    height: var(--height);
  }
  to {
    height: 0;
  }
}

[data-scope='accordion'][data-part='item-content'][data-state='open'] {
  animation: slideDown 250ms;
}

[data-scope='accordion'][data-part='item-content'][data-state='closed'] {
  animation: slideUp 200ms;
}

Fixed

  • Fixed a bug where the disabled Tooltip would flash upon hovering and clicking the trigger.
  • Fixed an issue where a disclosure components could not be initially set to an open state without being controlled.

[2.1.1] - 2024-02-16

Fixed

  • Resolved an issue where the Clipboard component was not exported correctly.

[2.1.0] - 2024-02-14

Added

  • Introduced Clipboard component. Refer to the documentation for details.
  • Implemented programmable control over the open state for ColorPicker, DatePicker, Dialog, HoverCard, Menu, Popover, Select, and Tooltip.
  • Exported SelectionDetails type for the Menu component.
  • Added a PresetTrigger part to the DatePicker component, enabling custom triggers for common date presets (e.g., Last 7 days, Last 30 days).
  • Enhanced the DatePicker.Control component to support multiple inputs by introducing an optional index attribute to DatePicker.Input. Example usage:
<DatePicker.Control>
  <DatePicker.Input index={0} />
  <DatePicker.Input index={1} />
</DatePicker.Control>

Changed

  • Refined the TreeView component API for streamlined component usage. See the documentation for details.
  • Updated Dialog.Description and Popover.Description elements from p to div for better paragraph handling.
  • Altered TreeView.BranchTrigger element from button to div for accessibility enhancements.

Fixed

  • Resolved unintentional interactions when clicking the scrollbar.
  • Addressed an issue where positioned components failed to adjust to window resizing.
  • Corrected a behavior where restoring scroll position triggered a smooth scroll effect back to the starting point.
  • Rectified a problem in Combobox, Menu, and Select where scrolling into view inadvertently scrolled the body element.
  • Fixed a discrepancy in DatePicker regarding the incorrect display of weeks when setting startOfWeek.
  • Solved an issue in the Editable preventing text deletion upon reaching maxLength.
  • Corrected an issue in the Select where an item group's label id was misdirected.
  • Adjusted Select to use the correct id for the aria-activedescendant attribute.

[2.0.1] - 2024-01-30

Fixed

  • Resolved an issue that for some components the types were not being generated correctly.
  • Fix issue where Select component submits its first option when used in a form, even if there is no value selected.

[2.0.0] - 2024-01-30

Added

  • Added TreeView component
  • Updated @zag-js dependencies to their latest versions, enhancing performance for all components.

Changed

  • Breaking Change: Renamed the asChild to as prop. The as prop now accepts a native HTML element or a custom component. For example:
- <Popover.Trigger asChild><Button>Open</Button></Popover.Trigger>
+ <Popover.Trigger as={<Button>Open</Button>} />
  • Breaking Change: Renamed the root types for all components to <ComponentName>RootProps. Like shown for the Avatar component below:
- import type { AvatarProps } from "@ark-ui/solid"
+ import type { AvatarRootProps } from "@ark-ui/solid"
  • Breaking Change: Removed the .Root suffix for provider component like Presence and Environment.
- <Presence.Root>...</Presence.Root>
+ <Presence>...</Presence>
  • Breaking Change: Renamed the indicator part to view in the Progress component to more accurately reflect its functionality.

  • Added the ItemPreview component to the TagsInput component. See the example below:

<TagsInput.Item index={index} value={value()}>
+  <TagsInput.ItemPreview>
    <TagsInput.ItemText>{value}</TagsInput.ItemText>
    <TagsInput.ItemDeleteTrigger>Delete</TagsInput.ItemDeleteTrigger>
+ </TagsInput.ItemPreview>
  <TagsInput.ItemInput />
</TagsInput.Item>

Fixed

  • Fixed an issue on touch devices where selecting an item within Combobox, Menu, or Select triggered a click event on the element behind the portalled content.
  • Fixed an issue in PinInput where pasting a value filled all inputs instead of populating them one per input.

[1.3.0] - 2024-01-17

Added

  • Added the Progress component.
  • Added valueAsString to onValueChange in DatePicker callback details
  • Exported change details typings, for example AccordionValueChangeDetails or DialogOpenChangeDetails

Changed

  • Changed Popover.Description tag from div to p
  • Changed PopoverDescriptionProps type from div to p
  • Replaced the styling props for indicator with CSS variables in RadioGroup, SegmentGroup, and Tabs.

Fixed

  • Fixed multiple rerenders on Select component using search params
  • Fixed reactivity with collection in Select and Combobox components
  • Fixed the issue where setting disabled on Combobox does not reflect in combobox item
  • Fix an issue that breaks the Combobox when clicking on the input while the menu is open
  • Fixed the issue where DatePicker initial value isn't set when using controlled context
  • Resolved an issue that asChild did not work properly with svg elements.
  • Resolved an issue that Menu option item could not be activated by keyboard

[1.2.0] - 2023-12-13

Added

  • Added the ToastGroup component.

Changed

  • Revised the FileUpload component. Check out the documentation for more information.

Fixed

  • Resolved a problem where Select.Indicator was assigned to the wrong data-part.
  • Fixed an issue where keyboard interactions within a submenu would bubble up to the parent Menu.

[1.1.0] - 2023-11-21

Added

  • Added render function to the NumberInput component
  • Added FileUpload component

Changed

  • Revised the ColorPicker component. Check out the documentation for more information.

Fixed

  • Resolved a problem where the Dialog.CloseTrigger was assigned to the wrong data-part.
  • Fixed various issues for the Toast component that were caused by the API not being wrapped in an Accessor.
// before
const [Toaster, toast] = createToaster({
  placement: 'top-end',
  render(toast) {
    return (
      <Toast.Root>
        <Toast.Title>{toast.title}</Toast.Title>
        <Toast.Description>{toast.description}</Toast.Description>
        <Toast.CloseTrigger>Close</Toast.CloseTrigger>
      </Toast.Root>
    )
  },
})

// after
const [Toaster, toast] = createToaster({
  placement: 'top-end',
  render(toast) {
    return (
      <Toast.Root>
        <Toast.Title>{toast().title}</Toast.Title>
        <Toast.Description>{toast().description}</Toast.Description>
        <Toast.CloseTrigger>Close</Toast.CloseTrigger>
      </Toast.Root>
    )
  },
})

[1.0.1] - 2023-11-10

Fixed

  • Resolved an issue where the Dialog component would not animate on exit.
  • Resolved various issues for Menu when lazy mounted.
  • Resolved an issue where MenuTrigger could still work even when disabled.
  • Resolved an issue where components like Dialog, Popover etc would not invoke onExitComplete
  • Fixed an issue where placement of the Combobox could be incorrect when lazy mounted.

[1.0.0] - 2023-11-09

We are happy to announce the release of @ark-ui/solid@1.0.0. This release includes a number of breaking changes, new features, and bug fixes. Since our last release over two months ago, we will only highlight some key changes. Please refer to the documentation for each component to learn more.

Highlights

  • Revised the Presence component: lazyMount and unmountOnExit have been added at the root level. For some disclosure components like Tabs and Accordion, this constitutes a breaking change.
  • Breaking changes have been implemented in Accordion, ColorPicker, DatePicker, Dialog, RadioGroup, SegmentGroup, TagsInput, Toast, and ToggleGroup to achieve a consistent and more intuitive API.
  • Resolved various bugs and addressed accessibility issues across all components.

Stability and Support

With the release of version 1.0.0, we are moving towards a more stable version of @ark-ui/solid. Future updates will strive to avoid breaking changes, ensuring a smoother experience for our users. If you encounter any issues while upgrading, please do not hesitate to open an issue on our GitHub repository. Your feedback is invaluable in helping us improve.

[0.11.0] - 2023-09-08

Added

  • Added Presence component
  • To improve performance and reduce initial load times, we've introduced two new properties to the AccordionContent, ComboboxContent, DialogBackdrop, DialogContent, HoverCardContent, MenuContent, PopoverContent, SelectContent, and TooltipContent components. The lazyMount property allows for on-demand rendering of content, while the unmountOnExit property enables the removal of the component from the DOM once it's no longer required, ensuring better resource management and cleaner code.

Fixed

  • Resolved an issue where the ark factory was not exported correctly.

[0.10.1] - 2023-09-02

Fixed

  • Resolved an issue where the ColorPicker was not exported correctly.

[0.10.0] - 2023-09-02

Addded

  • Added DatePickerPositioner component to the DatePicker component to help with positioning the calendar.
  • Added ComboboxOptionGroupLabel to the Combobox component. This component can be used to render a label for a group of options in the ComboboxOptionGroup component.
  • Exposed ark factory function.

Changed

  • BREAKING: Renamed NumberInputField to NumberInputInput to match the naming convention of other input components.
  • BREAKING: Renamed PinInputField to PinInputInput to match the naming convention of other input components.
  • BREAKING: Renamed TagsInputField to TagsInputInput to match the naming convention of other input components.
  • BREAKING: Renamed SegmentIndicator to SegmentGroupIndicator to match the naming convention of other components.

Removed

  • BREAKING: Removed CheckboxInput. This component is no longer required.
  • BREAKING: Removed RadioInput. This component is no longer required.
  • BREAKING: Removed SegmentInput. This component is no longer required.

Fixed

  • Added missing exports for ColorPicker.

[0.9.0] - 2023-08-06

Added

  • Enhanced Carousel component: Introduced CarouselIndicator and CarouselIndicatorGroup components. These sub-components offer finer control over the carousel navigation, enabling users to directly access desired carousel slides.
  • Expose use<X>Context for all components that use context.
  • Added ComboboxOptionGroup and ComboboxClearTrigger components to the Combobox component.
  • Developers can now set default options for all Toast components in their application, ensuring a consistent look and feel across the board.

[0.8.1] - 2023-07-10

Fixed

  • Resolved an issue whre the Toast component would not render custom content.
  • Fixed an issue where standalone imports were not working as expected.

[0.8.0] - 2023-07-06

Added

  • Added support for SSR

Fixed

  • Resolved an issue where the SegmentGroup component would not animate on the first click.

[0.7.1] - 2023-06-30

Fixed

  • Resolved an issue that types accross various components were not being exported correctly.

[0.7.0] - 2023-06-27

Added

  • Added Avatar
  • Added SegmentGroup
  • Support for standalone component imports: Developers can now import individual components, such as @ark-ui/solid/tabs instead of the full @ark-ui/solid package. This is a significant feature for those working with bundlers that do not support tree-shaking. By allowing imports of individual components, we ensure a reduced bundle size when the full package import is not necessary.

[0.6.0] - 2023-06-03

Added

  • Added DatePicker component
  • Introduced the onLongPress property to Pressable

Changed

  • Exposed direct access to the Splitter component's internal API, enabling more control over the component's state.
  • Updated all @zag-js dependencies to their latest versions

[0.5.0] - 2023-05-25

Removed

  • Removed AccordionIcon

[0.4.0] - 2023-05-23

Added

  • Add Switch

Changed

  • Update Checkbox. Control indeterminate state in checked prop

[0.3.0] - 2023-05-11

Added

  • Add support for asChild

[0.2.0] - 2023-04-29

Added

  • Add ColorPicker

Fixed

  • Add missing exports for RangeSlider, Splitter and Toast

[0.1.0] - 2023-04-17

Added

  • Add Accordion
  • Add Carousel
  • Add Checkbox
  • Add Combobox
  • Add DatePicker
  • Add Dialog
  • Add Editable
  • Add HoverCard
  • Add Menu
  • Add NumberInput
  • Add Pagination
  • Add PinInput
  • Add Popover
  • Add Pressable
  • Add RadioGroup
  • Add RangeSlider
  • Add RatingGroup
  • Add Select
  • Add Slider
  • Add Splitter
  • Add Tabs
  • Add TagsInput
  • Add Toast
  • Add Tooltip