Headless UI is a library of completely unstyled, fully accessible UI components for React and Vue. It provides behavior-only primitives like Combobox, Listbox, Dialog, Popover, Tabs, RadioGroup, and Switch, with no built-in styling, allowing consumers to own the visual layer. The architecture is a monorepo with parallel React and Vue packages that share identical component APIs, test suites, and accessibility patterns, ensuring feature parity across frameworks. Components use render props (React) and slots (Vue) to expose state like open, active, selected, and disabled, plus an `as` prop for polymorphic rendering and a Transition component for enter/leave animations. The codebase is heavily tested with thousands of test cases covering keyboard navigation, focus management, ARIA attributes, form integration, and edge cases like dynamic children and virtual scrolling. Key entry points include the Combobox, Listbox, and Dialog components in both React and Vue, along with shared test utilities for accessibility assertions and interaction simulation. The library is actively maintained with a focus on accessibility-first design, headless composition, and cross-framework consistency.
This is a small, focused React component library that wraps the native ResizeObserver API. It provides a declarative component (`<ResizeObserver>`) that can observe a single child element for size changes, supporting both direct children and render-prop patterns for cases where the observed element is not the immediate child. A `Collection` component uses React context and microtask batching to aggregate multiple resize events from child observers into a single callback, improving performance when many elements are observed. The library also exports a `useResizeObserver` hook for imperative use. Internally, it manages a single shared `ResizeObserver` instance with a map of element-to-callback sets, ensuring efficient resource usage. The code is clean, well-typed, and properly tested, making it a reliable building block for responsive UIs. As part of the Ant Design ecosystem, it follows established patterns and integrates smoothly with other @rc-component packages.