react-stately

Search for an npm package

react-stately

module "react-stately" {
export interface CalendarState<M extends CalendarSelectionMode = "single"> extends CalendarStateBase {

Whether single or multiple selection is enabled.

readonly selectionMode: M;

The currently selected date.

readonly value: CalendarValueType<CalendarDate | null, M>;

Sets the currently selected date.

setValue(value: CalendarValueType<CalendarDate | null, M>): void;
}
Referenced by
Unexported symbols referenced here
interface CalendarStateBase {

Whether the calendar is disabled.

readonly isDisabled: boolean;

Whether the calendar is in a read only state.

readonly isReadOnly: boolean;

The visible duration in the calendar.

readonly visibleDuration: DateDuration;

The date range that is currently visible in the calendar.

readonly visibleRange: import("@react-types/shared").RangeValue<CalendarDate>;

The minimum allowed date that a user may select.

readonly minValue?: DateValue | null;

The maximum allowed date that a user may select.

readonly maxValue?: DateValue | null;

The time zone of the dates currently being displayed.

readonly timeZone: string;

The current validation state of the selected value.

more
less

@deprecated — Use isValueInvalid instead.

readonly validationState: import("@react-types/shared").ValidationState | null;

Whether the calendar is invalid.

readonly isValueInvalid: boolean;

The currently focused date.

readonly focusedDate: CalendarDate;

Sets the focused date.

setFocusedDate(value: CalendarDate): void;

Moves focus to the next calendar date.

focusNextDay(): void;

Moves focus to the previous calendar date.

focusPreviousDay(): void;

Moves focus to the next row of dates, e.g. the next week.

focusNextRow(): void;

Moves focus to the previous row of dates, e.g. the previous work.

focusPreviousRow(): void;

Moves focus to the next page of dates, e.g. the next month if one month is visible.

focusNextPage(): void;

Moves focus to the previous page of dates, e.g. the previous month if one month is visible.

focusPreviousPage(): void;

Moves focus to the start of the current section of dates, e.g. the start of the current month.

focusSectionStart(): void;

Moves focus to the end of the current section of dates, e.g. the end of the current month month.

focusSectionEnd(): void;

Moves focus to the next section of dates based on what is currently displayed. By default, focus is moved by one of the currently displayed unit. For example, if one or more months are displayed, then focus is moved forward by one month. If the larger option is true, the focus is moved by the next larger unit than the one displayed. For example, if months are displayed, then focus moves to the next year.

focusNextSection(larger?: boolean): void;

Moves focus to the previous section of dates based on what is currently displayed. By default, focus is moved by one of the currently displayed unit. For example, if one or more months are displayed, then focus is moved backward by one month. If the larger option is true, the focus is moved by the next larger unit than the one displayed. For example, if months are displayed, then focus moves to the previous year.

focusPreviousSection(larger?: boolean): void;

Selects the currently focused date.

selectFocusedDate(): void;

Selects the given date.

selectDate(date: CalendarDate): void;

Whether focus is currently within the calendar.

readonly isFocused: boolean;

Sets whether focus is currently within the calendar.

setFocused(value: boolean): void;

Returns whether the given date is invalid according to the minValue and maxValue props.

isInvalid(date: CalendarDate): boolean;

Returns whether the given date is currently selected.

isSelected(date: CalendarDate): boolean;

Returns whether the given date is currently focused.

isCellFocused(date: CalendarDate): boolean;

Returns whether the given date is disabled according to the minValue, maxValue, and isDisabled` props.

isCellDisabled(date: CalendarDate): boolean;

Returns whether the given date is unavailable according to the isDateUnavailable prop.

isCellUnavailable(date: CalendarDate): boolean;

Returns whether the previous visible date range is allowed to be selected according to the minValue prop.

isPreviousVisibleRangeInvalid(): boolean;

Returns whether the next visible date range is allowed to be selected according to the maxValue prop.

isNextVisibleRangeInvalid(): boolean;

Returns an array of dates in the week index counted from the provided start date, or the first visible date if not given. The returned array always has 7 elements, but may include null if the date does not exist according to the calendar system.

getDatesInWeek(weekIndex: number, startDate?: CalendarDate): CalendarDate | null[];

Returns the number of weeks in a month.

getWeeksInMonth(startDate?: CalendarDate): number;
}
Referenced by
type CalendarValueType<T, M extends CalendarSelectionMode> = M extends "single" ? T : readonly T[]
Referenced by
export interface RangeCalendarState<T extends DateValue = DateValue> extends CalendarStateBase {

The currently selected date range.

readonly value: import("@react-types/shared").RangeValue<T> | null;

Sets the currently selected date range.

setValue(value: import("@react-types/shared").RangeValue<T> | null): void;

Highlights the given date during selection, e.g. by hovering or dragging.

highlightDate(date: CalendarDate): void;

The current anchor date that the user clicked on to begin range selection.

readonly anchorDate: CalendarDate | null;

Sets the anchor date that the user clicked on to begin range selection.

setAnchorDate(date: CalendarDate | null): void;

The currently highlighted date range.

readonly highlightedRange: import("@react-types/shared").RangeValue<CalendarDate> | null;

Whether the user is currently dragging over the calendar.

readonly isDragging: boolean;

Sets whether the user is dragging over the calendar.

setDragging(isDragging: boolean): void;

Clears the current selection.

clearSelection(): void;

Commits the current selection.

commitSelection(): void;

Focuses the next available day before or after the anchor date.

focusNearestAvailableDate(anchorDate: CalendarDate): void;
}
Referenced by
export interface CalendarStateOptions<T extends DateValue = DateValue, M extends CalendarSelectionMode = "single"> extends CalendarProps<T, M> {

The locale to display and edit the value according to.

locale: string;

A function that creates a Calendar object for a given calendar identifier. Such a function may be imported from the @internationalized/date package, or manually implemented to include support for only certain calendars.

createCalendar: (name: CalendarIdentifier) => Calendar;

The amount of days that will be displayed at once. This affects how pagination works.

more
less

@default — { months: 1 }

visibleDuration?: DateDuration;

Determines the alignment of the visible months on initial render based on the current selection or current date if there is no selection.

more
less

@default — 'center'

selectionAlignment?: "start" | "center" | "end";
}
Referenced by
export interface CalendarProps<T extends DateValue, M extends CalendarSelectionMode = "single"> extends CalendarPropsBase, import("@react-types/shared").ValueBase<CalendarValueType<T | null, M>, CalendarValueType<MappedDateValue<T>, M>> {

Whether single or multiple selection is enabled.

more
less

@default — 'single'

selectionMode?: M;

Callback that is called for each date of the calendar. If it returns true, then the date is unavailable.

isDateUnavailable?: (date: DateValue) => boolean;
}
Referenced by
Unexported symbols referenced here
interface CalendarPropsBase {

The minimum allowed date that a user may select.

minValue?: DateValue | null;

The maximum allowed date that a user may select.

maxValue?: DateValue | null;

Whether the calendar is disabled.

more
less

@default — false

isDisabled?: boolean;

Whether the calendar value is immutable.

more
less

@default — false

isReadOnly?: boolean;

Whether to automatically focus the calendar when it mounts.

more
less

@default — false

autoFocus?: boolean;

Controls the currently focused date within the calendar.

focusedValue?: DateValue | null;

The date that is focused when the calendar first mounts (uncontrolled).

defaultFocusedValue?: DateValue | null;

Handler that is called when the focused date changes.

onFocusChange?: (date: CalendarDate) => void;

Whether the current selection is valid or invalid according to application logic.

more
less

@deprecated — Use isInvalid instead.

validationState?: import("@react-types/shared").ValidationState;

Whether the current selection is invalid according to application logic.

isInvalid?: boolean;

An error message to display when the selected value is invalid.

errorMessage?: ReactNode;

Controls the behavior of paging. Pagination either works by advancing the visible page by visibleDuration (default) or one unit of visibleDuration.

more
less

@default — visible

pageBehavior?: PageBehavior;

The day that starts the week.

firstDayOfWeek?: "sun" | "mon" | "tue" | "wed" | "thu" | "fri" | "sat";

Determines the alignment of the visible months on initial render based on the current selection or current date if there is no selection.

more
less

@default — 'center'

selectionAlignment?: "start" | "center" | "end";

The number of weeks in a month. This overrides the default set by the locale.

weeksInMonth?: number;
}
Referenced by
type MappedDateValue<T> = T extends ZonedDateTime ? ZonedDateTime : T extends CalendarDateTime ? CalendarDateTime : T extends CalendarDate ? CalendarDate : never
Referenced by
type PageBehavior = "single" | "visible"
Referenced by
export interface RangeCalendarStateOptions<T extends DateValue = DateValue> extends RangeCalendarProps<T> {

The locale to display and edit the value according to.

locale: string;

A function that creates a Calendar object for a given calendar identifier. Such a function may be imported from the @internationalized/date package, or manually implemented to include support for only certain calendars.

createCalendar: (name: CalendarIdentifier) => Calendar;

The amount of days that will be displayed at once. This affects how pagination works.

more
less

@default — { months: 1 }

visibleDuration?: DateDuration;

Determines the alignment of the visible months on initial render based on the current selection or current date if there is no selection.

more
less

@default — 'center'

selectionAlignment?: "start" | "center" | "end";
}
Referenced by
export type DateRange = import("@react-types/shared").RangeValue<DateValue> | null
export interface RangeCalendarProps<T extends DateValue> extends CalendarPropsBase, import("@react-types/shared").ValueBase<import("@react-types/shared").RangeValue<T> | null, import("@react-types/shared").RangeValue<MappedDateValue<T>>> {

When combined with isDateUnavailable, determines whether non-contiguous ranges, i.e. ranges containing unavailable dates, may be selected.

allowsNonContiguousRanges?: boolean;

Callback that is called for each date of the calendar. If it returns true, then the date is unavailable. The second argument provides the current selection anchor date, if any. This can be used to adjust the available dates based on the user's first selected date.

isDateUnavailable?: (date: DateValue, anchorDate: CalendarDate | null) => boolean;
}
Referenced by
export interface CheckboxGroupProps extends import("@react-types/shared").ValueBase<string[]>, Pick<import("@react-types/shared").InputDOMProps, "name">, import("@react-types/shared").InputBase, import("@react-types/shared").LabelableProps, import("@react-types/shared").HelpTextProps, import("@react-types/shared").Validation<string[]> {}
Referenced by
export interface CheckboxGroupState extends FormValidationState {

Current selected values.

readonly value: readonly string[];

Default selected values.

readonly defaultValue: readonly string[];

Whether the checkbox group is disabled.

readonly isDisabled: boolean;

Whether the checkbox group is read only.

readonly isReadOnly: boolean;

The current validation state of the checkbox group.

more
less

@deprecated — Use isInvalid instead.

readonly validationState: import("@react-types/shared").ValidationState | null;

Whether the checkbox group is invalid.

readonly isInvalid: boolean;

Whether the checkboxes in the group are required. This changes to false once at least one item is selected.

readonly isRequired: boolean;

Returns whether the given value is selected.

isSelected(value: string): boolean;

Sets the selected values.

setValue(value: string[]): void;

Adds a value to the set of selected values.

addValue(value: string): void;

Removes a value from the set of selected values.

removeValue(value: string): void;

Toggles a value in the set of selected values.

toggleValue(value: string): void;

Sets whether one of the checkboxes is invalid.

setInvalid(value: string, validation: import("@react-types/shared").ValidationResult): void;
}
Referenced by
Unexported symbols referenced here
interface FormValidationState {

Realtime validation results, updated as the user edits the value.

realtimeValidation: import("@react-types/shared").ValidationResult;

Currently displayed validation results, updated when the user commits their changes.

displayValidation: import("@react-types/shared").ValidationResult;

Updates the current validation result. Not displayed to the user until commitValidation is called.

updateValidation(result: import("@react-types/shared").ValidationResult): void;

Resets the displayed validation state to valid when the user resets the form.

resetValidation(): void;

Commits the realtime validation so it is displayed to the user.

commitValidation(): void;
}
Referenced by

Represents a color value.

export interface Color {

Converts the color to the given color format, and returns a new Color object.

toFormat(format: ColorFormat): Color;

Converts the color to a string in the given format.

toString(format?: ColorFormat | "css"): string;

Returns a duplicate of the color value.

clone(): Color;

Converts the color to hex, and returns an integer representation.

toHexInt(): number;

Returns the numeric value for a given channel. Throws an error if the channel is unsupported in the current color format.

getChannelValue(channel: ColorChannel): number;

Sets the numeric value for a given channel, and returns a new Color object. Throws an error if the channel is unsupported in the current color format.

withChannelValue(channel: ColorChannel, value: number): Color;

Returns the minimum, maximum, and step values for a given channel.

getChannelRange(channel: ColorChannel): ColorChannelRange;

Returns a localized color channel name for a given channel and locale, for use in visual or accessibility labels.

getChannelName(channel: ColorChannel, locale: string): string;

Returns the number formatting options for the given channel.

getChannelFormatOptions(channel: ColorChannel): NumberFormatOptions;

Formats the numeric value for a given channel for display according to the provided locale.

formatChannelValue(channel: ColorChannel, locale: string): string;

Returns the color space, 'rgb', 'hsb' or 'hsl', for the current color.

getColorSpace(): ColorSpace;

Returns the color space axes, xChannel, yChannel, zChannel.

getColorSpaceAxes(xyChannels: {
xChannel?: ColorChannel;
yChannel?: ColorChannel;
}): ColorAxes;

Returns an array of the color channels within the current color space space.

getColorChannels(): [ColorChannel, ColorChannel, ColorChannel];

Returns a localized name for the color, for use in visual or accessibility labels.

getColorName(locale: string): string;

Returns a localized name for the hue, for use in visual or accessibility labels.

getHueName(locale: string): string;
}
Referenced by

A list of color channels.

export type ColorChannel = "hue" | "saturation" | "brightness" | "lightness" | "red" | "green" | "blue" | "alpha"
Referenced by

A list of supported color formats.

export type ColorFormat = "hex" | "hexa" | "rgb" | "rgba" | "hsl" | "hsla" | "hsb" | "hsba"
Referenced by
export type ColorSpace = "rgb" | "hsl" | "hsb"
Referenced by
export type ColorAxes = {
xChannel: ColorChannel;
yChannel: ColorChannel;
zChannel: ColorChannel;
}
Referenced by
export interface ColorChannelRange {

The minimum value of the color channel.

minValue: number;

The maximum value of the color channel.

maxValue: number;

The step value of the color channel, used when incrementing and decrementing.

step: number;

The page step value of the color channel, used when incrementing and decrementing.

pageSize: number;
}
Referenced by
export interface ColorAreaProps extends Omit<import("@react-types/shared").ValueBase<string | Color>, "onChange"> {

The color space that the color area operates in. The xChannel and yChannel must be in this color space. If not provided, this defaults to the color space of the color or defaultColor value.

colorSpace?: ColorSpace;

Color channel for the horizontal axis.

xChannel?: ColorChannel;

Color channel for the vertical axis.

yChannel?: ColorChannel;

Whether the ColorArea is disabled.

isDisabled?: boolean;

Handler that is called when the value changes, as the user drags.

onChange?: (value: Color) => void;

Handler that is called when the user stops dragging.

onChangeEnd?: (value: Color) => void;
}
Referenced by
export interface ColorAreaState {

The current color value displayed by the color area.

readonly value: Color;

The default value of the color area.

readonly defaultValue: Color;

Sets the current color value. If a string is passed, it will be parsed to a Color.

setValue(value: string | Color): void;

The current value of the horizontal axis channel displayed by the color area.

xValue: number;

Sets the value for the horizontal axis channel displayed by the color area, and triggers onChange.

setXValue(value: number): void;

The current value of the vertical axis channel displayed by the color area.

yValue: number;

Sets the value for the vertical axis channel displayed by the color area, and triggers onChange.

setYValue(value: number): void;

Sets the x and y channels of the current color value based on a percentage of the width and height of the color area, and triggers onChange.

setColorFromPoint(x: number, y: number): void;

Returns the coordinates of the thumb relative to the upper left corner of the color area as a percentage.

getThumbPosition(): {
x: number;
y: number;
};

Increments the value of the horizontal axis channel by the channel step or page amount.

incrementX(stepSize?: number): void;

Decrements the value of the horizontal axis channel by the channel step or page amount.

decrementX(stepSize?: number): void;

Increments the value of the vertical axis channel by the channel step or page amount.

incrementY(stepSize?: number): void;

Decrements the value of the vertical axis channel by the channel step or page amount.

decrementY(stepSize?: number): void;

Whether the color area is currently being dragged.

readonly isDragging: boolean;

Sets whether the color area is being dragged.

setDragging(value: boolean): void;

Returns the xChannel, yChannel and zChannel names based on the color value.

channels: {
xChannel: ColorChannel;
yChannel: ColorChannel;
zChannel: ColorChannel;
};

The step value of the xChannel, used when incrementing and decrementing.

xChannelStep: number;

The step value of the yChannel, used when incrementing and decrementing.

yChannelStep: number;

The page step value of the xChannel, used when incrementing and decrementing.

xChannelPageStep: number;

The page step value of the yChannel, used when incrementing and decrementing.

yChannelPageStep: number;

Returns the color that should be displayed in the color area thumb instead of value.

getDisplayColor(): Color;
}
Referenced by
export interface ColorChannelFieldProps extends ColorFieldProps {
colorSpace?: ColorSpace;
channel: ColorChannel;
}
Referenced by
export interface ColorChannelFieldState extends NumberFieldState {

The current value of the field.

colorValue: Color;

The default value of the field.

defaultColorValue: Color | null;

Sets the color value of the field.

setColorValue(value: Color | null): void;
}
Referenced by
export interface ColorChannelFieldStateOptions extends ColorChannelFieldProps {
locale: string;
}
Referenced by
export interface ColorFieldProps extends Omit<import("@react-types/shared").ValueBase<string | Color | null>, "onChange">, import("@react-types/shared").InputBase, import("@react-types/shared").Validation<Color | null>, import("@react-types/shared").FocusableProps, import("@react-types/shared").TextInputBase, import("@react-types/shared").LabelableProps, import("@react-types/shared").HelpTextProps {

Handler that is called when the value changes.

onChange?: (color: Color | null) => void;
}
Referenced by
export interface ColorFieldState extends FormValidationState {

The current text value of the input. Updated as the user types, and formatted according to formatOptions on blur.

readonly inputValue: string;

The currently parsed color value, or null if the field is empty. Updated based on the inputValue as the user types.

readonly colorValue: Color | null;

The default value of the color field.

readonly defaultColorValue: Color | null;

Sets the color value of the field.

setColorValue(value: Color | null): void;

Sets the current text value of the input.

setInputValue(value: string): void;

Updates the input value based on the currently parsed color value. Typically this is called when the field is blurred.

commit(): void;

Increments the current input value to the next step boundary, and fires onChange.

increment(): void;

Decrements the current input value to the next step boundary, and fires onChange.

decrement(): void;

Sets the current value to the maximum color value, and fires onChange.

incrementToMax(): void;

Sets the current value to the minimum color value, and fires onChange.

decrementToMin(): void;

Validates a user input string. Values can be partially entered, and may be valid even if they cannot currently be parsed to a color. Can be used to implement validation as a user types.

validate(value: string): boolean;
}
Referenced by
export interface ColorPickerProps extends import("@react-types/shared").ValueBase<string | Color, Color> {}
Referenced by
export interface ColorPickerState {

The current color value of the color picker.

color: Color;

Sets the current color value of the color picker.

setColor(color: Color | null): void;
}
Referenced by
export interface ColorSliderState extends SliderState {

The current color value represented by the color slider.

readonly value: Color;

Sets the current color value. If a string is passed, it will be parsed to a Color.

setValue(value: string | Color): void;

Returns the color that should be displayed in the slider instead of value or the optional parameter.

getDisplayColor(): Color;

Whether the color slider is currently being dragged.

readonly isDragging: boolean;
}
Referenced by
export interface ColorSliderStateOptions extends ColorSliderProps {

The locale to use for formatting the color channel value.

locale: string;
}
Referenced by
export interface ColorSliderProps extends Omit<SliderProps<string | Color>, "minValue" | "maxValue" | "step" | "pageSize" | "onChange" | "onChangeEnd"> {

The color space that the slider operates in. The channel must be in this color space. If not provided, this defaults to the color space of the color or defaultColor value.

colorSpace?: ColorSpace;

The color channel that the slider manipulates.

channel: ColorChannel;

Handler that is called when the value changes, as the user drags.

onChange?: (value: Color) => void;

Handler that is called when the user stops dragging.

onChangeEnd?: (value: Color) => void;
}
Referenced by
export interface ColorWheelProps extends Omit<import("@react-types/shared").ValueBase<string | Color>, "onChange"> {

Whether the ColorWheel is disabled.

isDisabled?: boolean;

Handler that is called when the value changes, as the user drags.

onChange?: (value: Color) => void;

Handler that is called when the user stops dragging.

onChangeEnd?: (value: Color) => void;

The default value (uncontrolled).

more
less

@default — 'hsl(0, 100%, 50%)'

defaultValue?: string | Color;
}
Referenced by
export interface ColorWheelState {

The current color value represented by the color wheel.

readonly value: Color;

The default color value.

readonly defaultValue: Color;

Sets the color value represented by the color wheel, and triggers onChange.

setValue(value: string | Color): void;

The current value of the hue channel displayed by the color wheel.

readonly hue: number;

Sets the hue channel of the current color value and triggers onChange.

setHue(value: number): void;

Sets the hue channel of the current color value based on the given coordinates and radius of the color wheel, and triggers onChange.

setHueFromPoint(x: number, y: number, radius: number): void;

Returns the coordinates of the thumb relative to the center point of the color wheel.

getThumbPosition(radius: number): {
x: number;
y: number;
};

Increments the hue by the given amount (defaults to 1).

increment(stepSize?: number): void;

Decrements the hue by the given amount (defaults to 1).

decrement(stepSize?: number): void;

Whether the color wheel is currently being dragged.

readonly isDragging: boolean;

Sets whether the color wheel is being dragged.

setDragging(value: boolean): void;

Returns the color that should be displayed in the color wheel instead of value.

getDisplayColor(): Color;

The step value of the hue channel, used when incrementing and decrementing.

step: number;

The page step value of the hue channel, used when incrementing and decrementing.

pageStep: number;

Whether the color wheel is disabled.

readonly isDisabled: boolean;
}
Referenced by
export interface ComboBoxState<T, M extends SelectionMode = "single"> extends ListState<T>, OverlayTriggerState, FormValidationState {

The key for the first selected item.

more
less

@deprecated —

readonly selectedKey: import("@react-types/shared").Key | null;

The default selected key.

more
less

@deprecated —

readonly defaultSelectedKey: import("@react-types/shared").Key | null;

Sets the selected key.

more
less

@deprecated —

setSelectedKey(key: import("@react-types/shared").Key | null): void;

The current combobox value.

readonly value: ValueType<M>;

The default combobox value.

readonly defaultValue: ValueType<M>;

Sets the combobox value.

setValue(value: import("@react-types/shared").Key | readonly import("@react-types/shared").Key[] | null): void;

The value of the first selected item.

more
less

@deprecated —

readonly selectedItem: import("@react-types/shared").Node<T> | null;

The value of the selected items.

readonly selectedItems: import("@react-types/shared").Node<T>[];

The current value of the combo box input.

inputValue: string;

The default value of the combo box input.

defaultInputValue: string;

Sets the value of the combo box input.

setInputValue(value: string): void;

Selects the currently focused item and updates the input value.

commit(): void;

Controls which item will be auto focused when the menu opens.

readonly focusStrategy: import("@react-types/shared").FocusStrategy | null;

Whether the select is currently focused.

readonly isFocused: boolean;

Sets whether the select is focused.

setFocused(isFocused: boolean): void;

Opens the menu.

open(focusStrategy?: import("@react-types/shared").FocusStrategy | null, trigger?: MenuTriggerAction): void;

Toggles the menu.

toggle(focusStrategy?: import("@react-types/shared").FocusStrategy | null, trigger?: MenuTriggerAction): void;

Resets the input value to the previously selected item's text if any and closes the menu.

revert(): void;
}
Referenced by
Unexported symbols referenced here
type ValueType<M extends SelectionMode> = M extends "single" ? import("@react-types/shared").Key | null : import("@react-types/shared").Key[]
Referenced by
type MenuTriggerAction = "focus" | "input" | "manual"
Referenced by
export interface ComboBoxStateOptions<T, M extends SelectionMode = "single"> extends Omit<ComboBoxProps<T, M>, "children">, import("@react-types/shared").CollectionStateBase<T> {

The filter function used to determine if a option should be included in the combo box list.

defaultFilter?: FilterFn;

Whether the combo box allows the menu to be open when the collection is empty.

allowsEmptyCollection?: boolean;

Whether the combo box menu should close on blur.

shouldCloseOnBlur?: boolean;
}
Referenced by
Unexported symbols referenced here
type FilterFn = (textValue: string, inputValue: string) => boolean
Referenced by
export interface ComboBoxProps<T, M extends SelectionMode = "single"> extends import("@react-types/shared").CollectionBase<T>, import("@react-types/shared").InputBase, import("@react-types/shared").ValueBase<ValueType<M>, ChangeValueType<M>>, import("@react-types/shared").TextInputBase, import("@react-types/shared").Validation<ComboBoxValidationValue<M>>, import("@react-types/shared").FocusableProps<HTMLInputElement>, import("@react-types/shared").LabelableProps, import("@react-types/shared").HelpTextProps {

The list of ComboBox items (uncontrolled).

defaultItems?: Iterable<T>;

The list of ComboBox items (controlled).

items?: Iterable<T>;

Method that is called when the open state of the menu changes. Returns the new open state and the action that caused the opening of the menu.

onOpenChange?: (isOpen: boolean, menuTrigger?: MenuTriggerAction) => void;

Whether single or multiple selection is enabled.

more
less

@default — 'single'

selectionMode?: M;

The currently selected key in the collection (controlled).

more
less

@deprecated —

selectedKey?: import("@react-types/shared").Key | null;

The initial selected key in the collection (uncontrolled).

more
less

@deprecated —

defaultSelectedKey?: import("@react-types/shared").Key | null;

Handler that is called when the selection changes.

more
less

@deprecated —

onSelectionChange?: (key: import("@react-types/shared").Key | null) => void;

The value of the ComboBox input (controlled).

inputValue?: string;

The default value of the ComboBox input (uncontrolled).

defaultInputValue?: string;

Handler that is called when the ComboBox input value changes.

onInputChange?: (value: string) => void;

Whether the ComboBox allows a non-item matching input value to be set.

allowsCustomValue?: boolean;

The interaction required to display the ComboBox menu.

more
less

@default — 'input'

menuTrigger?: MenuTriggerAction;
}
Referenced by
Unexported symbols referenced here
type ChangeValueType<M extends SelectionMode> = M extends "single" ? import("@react-types/shared").Key | null : import("@react-types/shared").Key[]
Referenced by
export interface ComboBoxValidationValue<M extends SelectionMode = "single"> {

The selected key in the ComboBox.

more
less

@deprecated —

selectedKey: import("@react-types/shared").Key | null;

The keys of the currently selected items.

value: ValidationType<M>;

The value of the ComboBox input.

inputValue: string;
}
Referenced by
Unexported symbols referenced here
type ValidationType<M extends SelectionMode> = M extends "single" ? import("@react-types/shared").Key | null : import("@react-types/shared").Key[]
Referenced by
export interface DateFieldState extends FormValidationState {

The current field value.

value: DateValue | null;

The default field value.

defaultValue: DateValue | null;

The current value, converted to a native JavaScript Date object.

dateValue: Date;

The calendar system currently in use.

calendar: Calendar;

Sets the field's value.

setValue(value: DateValue | null): void;

A list of segments for the current value.

segments: DateSegment[];

A date formatter configured for the current locale and format.

dateFormatter: DateFormatter;

The current validation state of the date field, based on the validationState, minValue, and maxValue props.

more
less

@deprecated — Use isInvalid instead.

validationState: import("@react-types/shared").ValidationState | null;

Whether the date field is invalid, based on the isInvalid, minValue, and maxValue props.

isInvalid: boolean;

The granularity for the field, based on the granularity prop and current value.

granularity: Granularity;

The maximum date or time unit that is displayed in the field.

maxGranularity: "year" | "month" | Granularity;

Whether the field is disabled.

isDisabled: boolean;

Whether the field is read only.

isReadOnly: boolean;

Whether the field is required.

isRequired: boolean;

Increments the given segment. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.

increment(type: DateSegmentType): void;

Decrements the given segment. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.

decrement(type: DateSegmentType): void;

Increments the given segment by a larger amount, rounding it to the nearest increment. The amount to increment by depends on the field, for example 15 minutes, 7 days, and 5 years. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.

incrementPage(type: DateSegmentType): void;

Decrements the given segment by a larger amount, rounding it to the nearest increment. The amount to decrement by depends on the field, for example 15 minutes, 7 days, and 5 years. Upon reaching the minimum or maximum value, the value wraps around to the opposite limit.

decrementPage(type: DateSegmentType): void;

Increments the given segment to its maxiumum value.

incrementToMax(type: DateSegmentType): void;

Decrements the given segment to its minimum value.

decrementToMin(type: DateSegmentType): void;

Sets the value of the given segment.

setSegment(type: "era", value: string): void;
setSegment(type: DateSegmentType, value: number): void;

Updates the remaining unfilled segments with the placeholder value.

confirmPlaceholder(): void;

Clears the value of the given segment, reverting it to the placeholder.

clearSegment(type: DateSegmentType): void;

Formats the current date value using the given options.

formatValue(fieldOptions: FieldOptions): string;

Gets a formatter based on state's props.

getDateFormatter(locale: string, formatOptions: FormatterOptions): DateFormatter;
}
Referenced by
Unexported symbols referenced here
type Granularity = "day" | "hour" | "minute" | "second"
Referenced by
type FieldOptions = Pick<DateTimeFormatOptions, "year" | "month" | "day" | "hour" | "minute" | "second">
Referenced by
interface FormatterOptions {
timeZone?: string;
hideTimeZone?: boolean;
granularity?: DatePickerProps<any>["granularity"];
maxGranularity?: "year" | "month" | DatePickerProps<any>["granularity"];
hourCycle?: 12 | 24;
showEra?: boolean;
shouldForceLeadingZeros?: boolean;
}
Referenced by
export interface DateFieldStateOptions<T extends DateValue = DateValue> extends DatePickerProps<T> {

The maximum unit to display in the date field.

more
less

@default — 'year'

maxGranularity?: "year" | "month" | Granularity;

The locale to display and edit the value according to.

locale: string;

A function that creates a Calendar object for a given calendar identifier. Such a function may be imported from the @internationalized/date package, or manually implemented to include support for only certain calendars.

createCalendar: (name: CalendarIdentifier) => Calendar;
}
Referenced by
export interface DateSegment {

The type of segment.

type: DateSegmentType;

The formatted text for the segment.

text: string;

The numeric value for the segment, if applicable.

value?: number | null;

The minimum numeric value for the segment, if applicable.

minValue?: number;

The maximum numeric value for the segment, if applicable.

maxValue?: number;

Whether the value is a placeholder.

isPlaceholder: boolean;

A placeholder string for the segment.

placeholder: string;

Whether the segment is editable.

isEditable: boolean;
}
Referenced by
export type DateSegmentType = "era" | "year" | "month" | "day" | "hour" | "minute" | "second" | "dayPeriod" | "literal" | "timeZoneName"
Referenced by
export interface DatePickerState extends OverlayTriggerState, FormValidationState {

The currently selected date.

value: DateValue | null;

The default date.

defaultValue: DateValue | null;

Sets the selected date.

setValue(value: DateValue | null): void;

The date portion of the value. This may be set prior to value if the user has selected a date but has not yet selected a time.

dateValue: DateValue | null;

Sets the date portion of the value.

setDateValue(value: DateValue): void;

The time portion of the value. This may be set prior to value if the user has selected a time but has not yet selected a date.

timeValue: TimeValue | null;

Sets the time portion of the value.

setTimeValue(value: TimeValue): void;

The granularity for the field, based on the granularity prop and current value.

granularity: Granularity;

Whether the date picker supports selecting a time, according to the granularity prop and current value.

hasTime: boolean;

Whether the calendar popover is currently open.

isOpen: boolean;

Sets whether the calendar popover is open.

setOpen(isOpen: boolean): void;

The current validation state of the date picker, based on the validationState, minValue, and maxValue props.

more
less

@deprecated — Use isInvalid instead.

validationState: import("@react-types/shared").ValidationState | null;

Whether the date picker is invalid, based on the isInvalid, minValue, and maxValue props.

isInvalid: boolean;

Formats the selected value using the given options.

formatValue(locale: string, fieldOptions: FieldOptions): string;

Gets a formatter based on state's props.

getDateFormatter(locale: string, formatOptions: FormatterOptions): DateFormatter;
}
Referenced by
export interface DatePickerStateOptions<T extends DateValue> extends DatePickerProps<T> {

Determines whether the date picker popover should close automatically when a date is selected.

more
less

@default — true

shouldCloseOnSelect?: boolean | (() => boolean);
}
Referenced by
export interface DateRangePickerState extends OverlayTriggerState, FormValidationState {

The currently selected date range.

value: import("@react-types/shared").RangeValue<DateValue | null>;

The default selected date range.

defaultValue: DateRange | null;

Sets the selected date range.

setValue(value: DateRange | null): void;

The date portion of the selected range. This may be set prior to value if the user has selected a date range but has not yet selected a time range.

dateRange: import("@react-types/shared").RangeValue<DateValue | null> | null;

Sets the date portion of the selected range.

setDateRange(value: DateRange): void;

The time portion of the selected range. This may be set prior to value if the user has selected a time range but has not yet selected a date range.

timeRange: import("@react-types/shared").RangeValue<TimeValue | null> | null;

Sets the time portion of the selected range.

setTimeRange(value: TimeRange): void;

Sets the date portion of either the start or end of the selected range.

setDate(part: "start" | "end", value: DateValue | null): void;

Sets the time portion of either the start or end of the selected range.

setTime(part: "start" | "end", value: TimeValue | null): void;

Sets the date and time of either the start or end of the selected range.

setDateTime(part: "start" | "end", value: DateValue | null): void;

The granularity for the field, based on the granularity prop and current value.

granularity: Granularity;

Whether the date range picker supports selecting times, according to the granularity prop and current value.

hasTime: boolean;

Whether the calendar popover is currently open.

isOpen: boolean;

Sets whether the calendar popover is open.

setOpen(isOpen: boolean): void;

The current validation state of the date range picker, based on the validationState, minValue, and maxValue props.

more
less

@deprecated — Use isInvalid instead.

validationState: import("@react-types/shared").ValidationState | null;

Whether the date range picker is invalid, based on the isInvalid, minValue, and maxValue props.

isInvalid: boolean;

Formats the selected range using the given options.

formatValue(locale: string, fieldOptions: FieldOptions): {
start: string;
end: string;
} | null;

Gets a formatter based on state's props.

getDateFormatter(locale: string, formatOptions: FormatterOptions): DateFormatter;
}
Referenced by
Unexported symbols referenced here
export interface DateRangePickerStateOptions<T extends DateValue = DateValue> extends DateRangePickerProps<T> {

Determines whether the date picker popover should close automatically when a date is selected.

more
less

@default — true

shouldCloseOnSelect?: boolean | (() => boolean);
}
Referenced by
export interface TimeFieldStateOptions<T extends TimeValue = TimeValue> extends TimePickerProps<T> {

The locale to display and edit the value according to.

locale: string;
}
Referenced by
export interface TimeFieldState extends DateFieldState {

The current time value.

timeValue: Time;
}
Referenced by
export interface DateFieldProps<T extends DateValue> extends DateFieldBase<T>, import("@react-types/shared").ValueBase<T | null, MappedDateValue<T> | null> {}
Unexported symbols referenced here
interface DateFieldBase<T extends DateValue> extends import("@react-types/shared").InputBase, import("@react-types/shared").Validation<MappedDateValue<T>>, import("@react-types/shared").FocusableProps, import("@react-types/shared").LabelableProps, import("@react-types/shared").HelpTextProps {

The minimum allowed date that a user may select.

minValue?: DateValue | null;

The maximum allowed date that a user may select.

maxValue?: DateValue | null;

Callback that is called for each date of the calendar. If it returns true, then the date is unavailable.

isDateUnavailable?: (date: DateValue) => boolean;

A placeholder date that influences the format of the placeholder shown when no value is selected. Defaults to today's date at midnight.

placeholderValue?: T | null;

Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale.

hourCycle?: 12 | 24;

Determines the smallest unit that is displayed in the date picker. By default, this is "day" for dates, and "minute" for times.

granularity?: Granularity;

Whether to hide the time zone abbreviation.

more
less

@default — false

hideTimeZone?: boolean;

Whether to always show leading zeros in the month, day, and hour fields. By default, this is determined by the user's locale.

shouldForceLeadingZeros?: boolean;
}
Referenced by
export interface DatePickerProps<T extends DateValue> extends DatePickerBase<T>, import("@react-types/shared").ValueBase<T | null, MappedDateValue<T> | null> {}
Referenced by
Unexported symbols referenced here
interface DatePickerBase<T extends DateValue> extends DateFieldBase<T>, OverlayTriggerProps {

Controls the behavior of paging. Pagination either works by advancing the visible page by visibleDuration (default) or one unit of visibleDuration.

more
less

@default — visible

pageBehavior?: PageBehavior;

The day that starts the week.

firstDayOfWeek?: "sun" | "mon" | "tue" | "wed" | "thu" | "fri" | "sat";
}
Referenced by
export interface DateRangePickerProps<T extends DateValue> extends Omit<DatePickerBase<T>, "validate" | "isDateUnavailable">, import("@react-types/shared").Validation<import("@react-types/shared").RangeValue<MappedDateValue<T>>>, import("@react-types/shared").ValueBase<import("@react-types/shared").RangeValue<T> | null, import("@react-types/shared").RangeValue<MappedDateValue<T>> | null> {

When combined with isDateUnavailable, determines whether non-contiguous ranges, i.e. ranges containing unavailable dates, may be selected.

allowsNonContiguousRanges?: boolean;

Callback that is called for each date of the calendar. If it returns true, then the date is unavailable.

isDateUnavailable?: (date: DateValue, anchorDate: CalendarDate | null) => boolean;

The name of the start date input element, used when submitting an HTML form. See MDN.

startName?: string;

The name of the end date input element, used when submitting an HTML form. See MDN.

endName?: string;
}
Referenced by
export interface TimePickerProps<T extends TimeValue> extends import("@react-types/shared").InputBase, import("@react-types/shared").Validation<MappedTimeValue<T>>, import("@react-types/shared").FocusableProps, import("@react-types/shared").LabelableProps, import("@react-types/shared").HelpTextProps, import("@react-types/shared").ValueBase<T | null, MappedTimeValue<T> | null> {

Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale.

hourCycle?: 12 | 24;

Determines the smallest unit that is displayed in the time picker.

more
less

@default — 'minute'

granularity?: "hour" | "minute" | "second";

Whether to hide the time zone abbreviation.

hideTimeZone?: boolean;

Whether to always show leading zeros in the hour field. By default, this is determined by the user's locale.

shouldForceLeadingZeros?: boolean;

A placeholder time that influences the format of the placeholder shown when no value is selected. Defaults to 12:00 AM or 00:00 depending on the hour cycle.

placeholderValue?: T;

The minimum allowed time that a user may select.

minValue?: TimeValue | null;

The maximum allowed time that a user may select.

maxValue?: TimeValue | null;
}
Referenced by
export type TimeValue = Time | CalendarDateTime | ZonedDateTime
Referenced by
export type MappedDateValue<T> = T extends ZonedDateTime ? ZonedDateTime : T extends CalendarDateTime ? CalendarDateTime : T extends CalendarDate ? CalendarDate : never
Referenced by
export type MappedTimeValue<T> = T extends ZonedDateTime ? ZonedDateTime : T extends CalendarDateTime ? CalendarDateTime : T extends Time ? Time : never
Referenced by
export interface DisclosureState {

Whether the disclosure is currently expanded.

readonly isExpanded: boolean;

Sets whether the disclosure is expanded.

setExpanded(isExpanded: boolean): void;

Expand the disclosure.

expand(): void;

Collapse the disclosure.

collapse(): void;

Toggles the disclosure's visibility.

toggle(): void;
}
Referenced by
export interface DisclosureProps {

Whether the disclosure is expanded (controlled).

isExpanded?: boolean;

Whether the disclosure is expanded by default (uncontrolled).

defaultExpanded?: boolean;

Handler that is called when the disclosure expanded state changes.

onExpandedChange?: (isExpanded: boolean) => void;
}
Referenced by
export interface DisclosureGroupState {

Whether multiple items can be expanded at the same time.

readonly allowsMultipleExpanded: boolean;

Whether all items are disabled.

readonly isDisabled: boolean;

A set of keys for items that are expanded.

readonly expandedKeys: Set<import("@react-types/shared").Key>;

Toggles the expanded state for an item by its key.

toggleKey(key: import("@react-types/shared").Key): void;

Replaces the set of expanded keys.

setExpandedKeys(keys: Set<import("@react-types/shared").Key>): void;
}
Referenced by
export interface DisclosureGroupProps {

Whether multiple items can be expanded at the same time.

allowsMultipleExpanded?: boolean;

Whether all items are disabled.

isDisabled?: boolean;

The currently expanded keys in the group (controlled).

expandedKeys?: Iterable<import("@react-types/shared").Key>;

The initial expanded keys in the group (uncontrolled).

defaultExpandedKeys?: Iterable<import("@react-types/shared").Key>;

Handler that is called when items are expanded or collapsed.

onExpandedChange?: (keys: Set<import("@react-types/shared").Key>) => any;
}
Referenced by
export interface DraggableCollectionStateOptions<T = object> extends import("@react-types/shared").DraggableCollectionProps<T> {

A collection of items.

collection: import("@react-types/shared").Collection<import("@react-types/shared").Node<unknown>>;

An interface for reading and updating multiple selection state.

selectionManager: MultipleSelectionManager;

Whether the drag events should be disabled.

isDisabled?: boolean;
}
Referenced by
export interface DraggableCollectionState {

A collection of items.

collection: import("@react-types/shared").Collection<import("@react-types/shared").Node<unknown>>;

An interface for reading and updating multiple selection state.

selectionManager: MultipleSelectionManager;

The key of the item that initiated a drag.

draggedKey: import("@react-types/shared").Key | null;

The keys of the items that are currently being dragged.

draggingKeys: Set<import("@react-types/shared").Key>;

Whether drag events are disabled.

isDisabled?: boolean;

Returns whether the given key is currently being dragged.

isDragging(key: import("@react-types/shared").Key): boolean;

Returns the keys of the items that will be dragged with the given key (e.g. selected items).

getKeysForDrag(key: import("@react-types/shared").Key): Set<import("@react-types/shared").Key>;

Returns the items to drag for the given key.

getItems(key: import("@react-types/shared").Key): import("@react-types/shared").DragItem[];

The ref of the element that will be rendered as the drag preview while dragging.

preview?: import("@react-types/shared").RefObject<import("@react-types/shared").DragPreviewRenderer | null>;

Function that returns the drop operations that are allowed for the dragged items. If not provided, all drop operations are allowed.

getAllowedDropOperations?: () => import("@react-types/shared").DropOperation[];

Begins a drag for the given key. This triggers the onDragStart event.

startDrag(key: import("@react-types/shared").Key, event: import("@react-types/shared").DragStartEvent): void;

Triggers an onDragMove event.

moveDrag(event: import("@react-types/shared").DragMoveEvent): void;

Ends the current drag, and emits an onDragEnd event.

endDrag(event: import("@react-types/shared").DraggableCollectionEndEvent): void;
}
Referenced by
export interface DroppableCollectionStateOptions extends Omit<import("@react-types/shared").DroppableCollectionProps, "onDropMove" | "onDropActivate"> {

A collection of items.

collection: import("@react-types/shared").Collection<import("@react-types/shared").Node<unknown>>;

An interface for reading and updating multiple selection state.

selectionManager: MultipleSelectionManager;

Whether the drop events should be disabled.

isDisabled?: boolean;
}
Referenced by
export interface DroppableCollectionState {

A collection of items.

collection: import("@react-types/shared").Collection<import("@react-types/shared").Node<unknown>>;

An interface for reading and updating multiple selection state.

selectionManager: MultipleSelectionManager;

The current drop target.

target: import("@react-types/shared").DropTarget | null;

Whether drop events are disabled.

isDisabled?: boolean;

Sets the current drop target.

setTarget(target: import("@react-types/shared").DropTarget | null): void;

Returns whether the given target is equivalent to the current drop target.

isDropTarget(target: import("@react-types/shared").DropTarget | null): boolean;

Returns the drop operation for the given parameters.

getDropOperation(e: DropOperationEvent): import("@react-types/shared").DropOperation;
}
Referenced by
Unexported symbols referenced here
interface DropOperationEvent {
allowedOperations: import("@react-types/shared").DropOperation[];
isInternal: boolean;
draggingKeys: Set<import("@react-types/shared").Key>;
}
Referenced by
export interface AsyncListOptions<T, C> {

The keys for the initially selected items.

initialSelectedKeys?: Iterable<import("@react-types/shared").Key>;

The initial sort descriptor.

initialSortDescriptor?: import("@react-types/shared").SortDescriptor;

The initial filter text.

initialFilterText?: string;

A function that returns a unique key for an item object.

getKey?: (item: T) => import("@react-types/shared").Key;

A function that loads the data for the items in the list.

load: AsyncListLoadFunction<T, C>;

An optional function that performs sorting. If not provided, then sortDescriptor is passed to the load function.

sort?: AsyncListLoadFunction<T, C, AsyncListLoadOptions<T, C> & {
sortDescriptor: import("@react-types/shared").SortDescriptor;
}>;
}
Referenced by
export interface AsyncListData<T> extends ListData<T> {

Whether data is currently being loaded.

isLoading: boolean;

If loading data failed, then this contains the error that occurred.

error?: Error;

The current sort descriptor for the list.

sortDescriptor?: import("@react-types/shared").SortDescriptor;

Reloads the data in the list.

reload(): void;

Loads the next page of data in the list.

loadMore(): void;

Triggers sorting for the list.

sort(descriptor: import("@react-types/shared").SortDescriptor): void;

The current loading state for the list.

loadingState: import("@react-types/shared").LoadingState;
}
Referenced by
export type AsyncListLoadFunction<T, C, S extends AsyncListLoadOptions<T, C> = AsyncListLoadOptions<T, C>> = (state: S) => AsyncListStateUpdate<T, C> | Promise<AsyncListStateUpdate<T, C>>
Referenced by
export interface AsyncListLoadOptions<T, C> {

The items currently in the list.

items: T[];

The keys of the currently selected items in the list.

selectedKeys: import("@react-types/shared").Selection;

The current sort descriptor for the list.

sortDescriptor?: import("@react-types/shared").SortDescriptor;

An abort signal used to notify the load function that the request has been aborted.

signal: AbortSignal;

The pagination cursor returned from the last page load.

cursor?: C;

The current filter text used to perform server side filtering.

filterText?: string;

The current loading state of the list.

loadingState?: import("@react-types/shared").LoadingState;
}
Referenced by
export interface AsyncListStateUpdate<T, C> {

The new items to append to the list.

items: Iterable<T>;

The keys to add to the selection.

selectedKeys?: Iterable<import("@react-types/shared").Key>;

The sort descriptor to set.

sortDescriptor?: import("@react-types/shared").SortDescriptor;

The pagination cursor to be used for the next page load.

cursor?: C;

The updated filter text for the list.

filterText?: string;
}
Referenced by
export interface ListData<T> {

The items in the list.

items: T[];

The keys of the currently selected items in the list.

selectedKeys: import("@react-types/shared").Selection;

Sets the selected keys.

setSelectedKeys(keys: import("@react-types/shared").Selection): void;

Adds the given keys to the current selected keys.

addKeysToSelection(keys: import("@react-types/shared").Selection): void;

Removes the given keys from the current selected keys.

removeKeysFromSelection(keys: import("@react-types/shared").Selection): void;

The current filter text.

filterText: string;

Sets the filter text.

setFilterText(filterText: string): void;

Gets an item from the list by key.

more
less

@param — - The key of the item to retrieve.

getItem(key: import("@react-types/shared").Key): T | undefined;

Inserts items into the list at the given index.

more
less

@param — - The index to insert into.

@param — - The values to insert.

insert(index: number, ...values: T[]): void;

Inserts items into the list before the item at the given key.

more
less

@param — - The key of the item to insert before.

@param — - The values to insert.

insertBefore(key: import("@react-types/shared").Key, ...values: T[]): void;

Inserts items into the list after the item at the given key.

more
less

@param — - The key of the item to insert after.

@param — - The values to insert.

insertAfter(key: import("@react-types/shared").Key, ...values: T[]): void;

Appends items to the list.

more
less

@param — - The values to insert.

append(...values: T[]): void;

Prepends items to the list.

more
less

@param — - The value to insert.

prepend(...values: T[]): void;

Removes items from the list by their keys.

more
less

@param — - The keys of the item to remove.

remove(...keys: import("@react-types/shared").Key[]): void;

Removes all items from the list that are currently in the set of selected items.

removeSelectedItems(): void;

Moves an item within the list.

more
less

@param — - The key of the item to move.

@param — - The index to move the item to.

move(key: import("@react-types/shared").Key, toIndex: number): void;

Moves one or more items before a given key.

more
less

@param — - The key of the item to move the items before.

@param — - The keys of the items to move.

moveBefore(key: import("@react-types/shared").Key, keys: Iterable<import("@react-types/shared").Key>): void;

Moves one or more items after a given key.

more
less

@param — - The key of the item to move the items after.

@param — - The keys of the items to move.

moveAfter(key: import("@react-types/shared").Key, keys: Iterable<import("@react-types/shared").Key>): void;

Updates an item in the list.

more
less

@param — - The key of the item to update.

@param — - The new value for the item, or a function that returns the new value based on the previous value.

update(key: import("@react-types/shared").Key, newValue: T | ((prev: T) => T)): void;
}
Referenced by
export interface ListOptions<T> {

Initial items in the list.

initialItems?: T[];

The keys for the initially selected items.

initialSelectedKeys?: "all" | Iterable<import("@react-types/shared").Key>;

The initial text to filter the list by.

initialFilterText?: string;

A function that returns a unique key for an item object.

getKey?: (item: T) => import("@react-types/shared").Key;

A function that returns whether a item matches the current filter text.

filter?: (item: T, filterText: string) => boolean;
}
Referenced by
export interface TreeData<T extends object> {

The root nodes in the tree.

items: TreeNode<T>[];

The keys of the currently selected items in the tree.

selectedKeys: Set<import("@react-types/shared").Key>;

Sets the selected keys.

setSelectedKeys(keys: Set<import("@react-types/shared").Key>): void;

Gets a node from the tree by key.

more
less

@param — - The key of the item to retrieve.

getItem(key: import("@react-types/shared").Key): TreeNode<T> | undefined;

Inserts an item into a parent node as a child.

more
less

@param — - The key of the parent item to insert into. null for the root.

@param — - The index within the parent to insert into.

@param — - The value to insert.

insert(parentKey: import("@react-types/shared").Key | null, index: number, ...values: T[]): void;

Inserts items into the list before the item at the given key.

more
less

@param — - The key of the item to insert before.

@param — - The values to insert.

insertBefore(key: import("@react-types/shared").Key, ...values: T[]): void;

Inserts items into the list after the item at the given key.

more
less

@param — - The key of the item to insert after.

@param — - The values to insert.

insertAfter(key: import("@react-types/shared").Key, ...values: T[]): void;

Appends an item into a parent node as a child.

more
less

@param — - The key of the parent item to insert into. null for the root.

@param — - The value to insert.

append(parentKey: import("@react-types/shared").Key | null, ...values: T[]): void;

Prepends an item into a parent node as a child.

more
less

@param — - The key of the parent item to insert into. null for the root.

@param — - The value to insert.

prepend(parentKey: import("@react-types/shared").Key | null, ...value: T[]): void;

Removes an item from the tree by its key.

more
less

@param — - The key of the item to remove.

remove(...keys: import("@react-types/shared").Key[]): void;

Removes all items from the tree that are currently in the set of selected items.

removeSelectedItems(): void;

Moves an item within the tree.

more
less

@param — - The key of the item to move.

@param — - The key of the new parent to insert into. null for the root.

@param — - The index within the new parent to insert at.

move(key: import("@react-types/shared").Key, toParentKey: import("@react-types/shared").Key | null, index: number): void;

Moves one or more items before a given key.

more
less

@param — - The key of the item to move the items before.

@param — - The keys of the items to move.

moveBefore(key: import("@react-types/shared").Key, keys: Iterable<import("@react-types/shared").Key>): void;

Moves one or more items after a given key.

more
less

@param — - The key of the item to move the items after.

@param — - The keys of the items to move.

moveAfter(key: import("@react-types/shared").Key, keys: Iterable<import("@react-types/shared").Key>): void;

Updates an item in the tree.

more
less

@param — - The key of the item to update.

@param — - The new value for the item.

update(key: import("@react-types/shared").Key, newValue: T): void;
}
Referenced by
Unexported symbols referenced here
interface TreeNode<T extends object> {

A unique key for the tree node.

key: import("@react-types/shared").Key;

The key of the parent node.

parentKey?: import("@react-types/shared").Key | null;

The value object for the tree node.

value: T;

Children of the tree node.

children: TreeNode<T>[] | null;
}
Referenced by
export interface TreeOptions<T extends object> {

Initial root items in the tree.

initialItems?: T[];

The keys for the initially selected items.

initialSelectedKeys?: Iterable<import("@react-types/shared").Key>;

A function that returns a unique key for an item object.

getKey?: (item: T) => import("@react-types/shared").Key;

A function that returns the children for an item object.

getChildren?: (item: T) => T[];
}
Referenced by
export interface ListProps<T> extends import("@react-types/shared").CollectionStateBase<T>, MultipleSelectionStateProps {

Filter function to generate a filtered list of nodes.

filter?: (nodes: Iterable<import("@react-types/shared").Node<T>>) => Iterable<import("@react-types/shared").Node<T>>;

@private —

suppressTextValueWarning?: boolean;

A delegate object that provides layout information for items in the collection. This can be used to override the behavior of shift selection.

layoutDelegate?: import("@react-types/shared").LayoutDelegate;
}
Referenced by
export interface ListState<T> {

A collection of items in the list.

collection: import("@react-types/shared").Collection<import("@react-types/shared").Node<T>>;

A set of items that are disabled.

disabledKeys: Set<import("@react-types/shared").Key>;

A selection manager to read and update multiple selection state.

selectionManager: SelectionManager;
}
Referenced by
Unexported symbols referenced here

An interface for reading and updating multiple selection state.

class SelectionManager implements MultipleSelectionManager {
constructor(collection: import("@react-types/shared").Collection<import("@react-types/shared").Node<unknown>>, state: MultipleSelectionState, options?: SelectionManagerOptions)
collection: import("@react-types/shared").Collection<import("@react-types/shared").Node<unknown>>;
get selectionMode(): SelectionMode;
get disallowEmptySelection(): boolean;
get selectionBehavior(): SelectionBehavior;

Sets the selection behavior for the collection.

setSelectionBehavior(selectionBehavior: import("@react-types/shared").SelectionBehavior): void;
get isFocused(): boolean;

Sets whether the collection is focused.

setFocused(isFocused: boolean): void;
get focusedKey(): Key | null;
get childFocusStrategy(): FocusStrategy | null;

Sets the focused key.

setFocusedKey(key: import("@react-types/shared").Key | null, childFocusStrategy?: import("@react-types/shared").FocusStrategy): void;
get selectedKeys(): Set<Key>;
get rawSelection(): ISelection;

Returns whether a key is selected.

isSelected(key: import("@react-types/shared").Key): boolean;
get isEmpty(): boolean;
get isSelectAll(): boolean;
get firstSelectedKey(): Key | null;
get lastSelectedKey(): Key | null;
get disabledKeys(): Set<Key>;
get disabledBehavior(): DisabledBehavior;

Extends the selection to the given key.

extendSelection(toKey: import("@react-types/shared").Key): void;

Toggles whether the given key is selected.

toggleSelection(key: import("@react-types/shared").Key): void;

Replaces the selection with only the given key.

replaceSelection(key: import("@react-types/shared").Key): void;

Replaces the selection with the given keys.

setSelectedKeys(keys: Iterable<import("@react-types/shared").Key>): void;

Selects all items in the collection.

selectAll(): void;

Removes all keys from the selection.

clearSelection(): void;

Toggles between select all and an empty selection.

toggleSelectAll(): void;
select(key: import("@react-types/shared").Key, e?: import("@react-types/shared").PressEvent | import("@react-types/shared").LongPressEvent | PointerEvent): void;

Returns whether the current selection is equal to the given selection.

isSelectionEqual(selection: Set<import("@react-types/shared").Key>): boolean;
canSelectItem(key: import("@react-types/shared").Key): boolean;
isDisabled(key: import("@react-types/shared").Key): boolean;
isLink(key: import("@react-types/shared").Key): boolean;
getItemProps(key: import("@react-types/shared").Key): any;
withCollection(collection: import("@react-types/shared").Collection<import("@react-types/shared").Node<unknown>>): SelectionManager;
}
Referenced by
interface SelectionManagerOptions {
allowsCellSelection?: boolean;
layoutDelegate?: import("@react-types/shared").LayoutDelegate;
fullCollection?: import("@react-types/shared").Collection<import("@react-types/shared").Node<unknown>>;
}
Referenced by
export interface SingleSelectListProps<T> extends import("@react-types/shared").CollectionStateBase<T>, Omit<import("@react-types/shared").SingleSelection, "disallowEmptySelection"> {

Filter function to generate a filtered list of nodes.

filter?: (nodes: Iterable<import("@react-types/shared").Node<T>>) => Iterable<import("@react-types/shared").Node<T>>;

@private —

suppressTextValueWarning?: boolean;
}
Referenced by
export interface SingleSelectListState<T> extends ListState<T> {

The key for the currently selected item.

readonly selectedKey: import("@react-types/shared").Key | null;

Sets the selected key.

setSelectedKey(key: import("@react-types/shared").Key | null): void;

The value of the currently selected item.

readonly selectedItem: import("@react-types/shared").Node<T> | null;
}
Referenced by
export interface MenuTriggerProps extends OverlayTriggerProps {

How the menu is triggered.

more
less

@default — 'press'

trigger?: MenuTriggerType;
}
Referenced by
Unexported symbols referenced here
type MenuTriggerType = "press" | "longPress"
Referenced by
export interface MenuTriggerState extends OverlayTriggerState {

Controls which item will be auto focused when the menu opens.

readonly focusStrategy: import("@react-types/shared").FocusStrategy | null;

Opens the menu.

open(focusStrategy?: import("@react-types/shared").FocusStrategy | null): void;

Toggles the menu.

toggle(focusStrategy?: import("@react-types/shared").FocusStrategy | null): void;
}
Referenced by
export interface RootMenuTriggerState extends MenuTriggerState {

Opens a specific submenu tied to a specific menu item at a specific level.

openSubmenu: (triggerKey: import("@react-types/shared").Key, level: number) => void;

Closes a specific submenu tied to a specific menu item at a specific level.

closeSubmenu: (triggerKey: import("@react-types/shared").Key, level: number) => void;

An array of open submenu trigger keys within the menu tree. The index of key within array matches the submenu level in the tree.

expandedKeysStack: import("@react-types/shared").Key[];

Closes the menu and all submenus in the menu tree.

close: () => void;
}
Referenced by
export interface SubmenuTriggerState extends OverlayTriggerState {

Whether the submenu is currently open.

isOpen: boolean;

Controls which item will be auto focused when the submenu opens.

focusStrategy: import("@react-types/shared").FocusStrategy | null;

Opens the submenu.

open: (focusStrategy?: import("@react-types/shared").FocusStrategy | null) => void;

Closes the submenu.

close: () => void;

Closes all menus and submenus in the menu tree.

closeAll: () => void;

The level of the submenu.

submenuLevel: number;

Toggles the submenu.

toggle: (focusStrategy?: import("@react-types/shared").FocusStrategy | null) => void;

@private —

setOpen: () => void;
}
Referenced by
export interface SubmenuTriggerProps {

Key of the trigger item.

triggerKey: import("@react-types/shared").Key;
}
Referenced by
export interface OverlayTriggerProps {

Whether the overlay is open by default (controlled).

isOpen?: boolean;

Whether the overlay is open by default (uncontrolled).

defaultOpen?: boolean;

Handler that is called when the overlay's open state changes.

onOpenChange?: (isOpen: boolean) => void;
}
Referenced by
export interface OverlayTriggerState {

Whether the overlay is currently open.

readonly isOpen: boolean;

Sets whether the overlay is open.

setOpen(isOpen: boolean): void;

Opens the overlay.

open(): void;

Closes the overlay.

close(): void;

Toggles the overlay's visibility.

toggle(): void;
}
Referenced by
export interface RadioGroupProps extends import("@react-types/shared").ValueBase<string | null, string>, import("@react-types/shared").InputBase, Pick<import("@react-types/shared").InputDOMProps, "name">, import("@react-types/shared").Validation<string>, import("@react-types/shared").LabelableProps, import("@react-types/shared").HelpTextProps, import("@react-types/shared").FocusEvents {

The axis the Radio Button(s) should align with.

more
less

@default — 'vertical'

orientation?: import("@react-types/shared").Orientation;
}
Referenced by
export interface RadioGroupState extends FormValidationState {

The name for the group, used for native form submission.

more
less

@private —

@deprecated —

readonly name: string;

Whether the radio group is disabled.

readonly isDisabled: boolean;

Whether the radio group is read only.

readonly isReadOnly: boolean;

Whether the radio group is required.

readonly isRequired: boolean;

Whether the radio group is valid or invalid.

more
less

@deprecated — Use isInvalid instead.

readonly validationState: import("@react-types/shared").ValidationState | null;

Whether the radio group is invalid.

readonly isInvalid: boolean;

The currently selected value.

readonly selectedValue: string | null;

The default selected value.

readonly defaultSelectedValue: string | null;

Sets the selected value.

setSelectedValue(value: string | null): void;

The value of the last focused radio.

readonly lastFocusedValue: string | null;

Sets the last focused value.

setLastFocusedValue(value: string | null): void;
}
Referenced by
export interface SearchFieldProps extends TextFieldProps {

Handler that is called when the SearchField is submitted.

onSubmit?: (value: string) => void;

Handler that is called when the clear button is pressed.

onClear?: () => void;
}
Referenced by
Unexported symbols referenced here
export interface SearchFieldState {

The current value of the search field.

readonly value: string;

Sets the value of the search field.

setValue(value: string): void;
}
Referenced by
export interface SelectProps<T, M extends SelectionMode = "single"> extends import("@react-types/shared").CollectionBase<T>, Omit<import("@react-types/shared").InputBase, "isReadOnly">, import("@react-types/shared").ValueBase<ValueType<M>, ChangeValueType<M>>, import("@react-types/shared").Validation<ValidationType<M>>, import("@react-types/shared").HelpTextProps, import("@react-types/shared").LabelableProps, import("@react-types/shared").TextInputBase, import("@react-types/shared").FocusableProps {

Whether single or multiple selection is enabled.

more
less

@default — 'single'

selectionMode?: M;

The currently selected key in the collection (controlled).

more
less

@deprecated —

selectedKey?: import("@react-types/shared").Key | null;

The initial selected key in the collection (uncontrolled).

more
less

@deprecated —

defaultSelectedKey?: import("@react-types/shared").Key | null;

Handler that is called when the selection changes.

more
less

@deprecated —

onSelectionChange?: (key: import("@react-types/shared").Key | null) => void;

Sets the open state of the menu.

isOpen?: boolean;

Sets the default open state of the menu.

defaultOpen?: boolean;

Method that is called when the open state of the menu changes.

onOpenChange?: (isOpen: boolean) => void;

Whether the Select should close when an item is selected. Defaults to true if selectionMode is single, false otherwise.

shouldCloseOnSelect?: boolean;

Whether the select should be allowed to be open when the collection is empty.

allowsEmptyCollection?: boolean;
}
Referenced by
Unexported symbols referenced here
type ValueType<M extends SelectionMode> = M extends "single" ? import("@react-types/shared").Key | null : readonly import("@react-types/shared").Key[]
Referenced by
type ChangeValueType<M extends SelectionMode> = M extends "single" ? import("@react-types/shared").Key | null : import("@react-types/shared").Key[]
Referenced by
type ValidationType<M extends SelectionMode> = M extends "single" ? import("@react-types/shared").Key : import("@react-types/shared").Key[]
Referenced by
export interface SelectState<T, M extends SelectionMode = "single"> extends ListState<T>, OverlayTriggerState, FormValidationState {

The key for the first selected item.

more
less

@deprecated —

readonly selectedKey: import("@react-types/shared").Key | null;

The default selected key.

more
less

@deprecated —

readonly defaultSelectedKey: import("@react-types/shared").Key | null;

Sets the selected key.

more
less

@deprecated —

setSelectedKey(key: import("@react-types/shared").Key | null): void;

The current select value.

readonly value: ValueType<M>;

The default select value.

readonly defaultValue: ValueType<M>;

Sets the select value.

setValue(value: import("@react-types/shared").Key | readonly import("@react-types/shared").Key[] | null): void;

The value of the first selected item.

more
less

@deprecated —

readonly selectedItem: import("@react-types/shared").Node<T> | null;

The value of the selected items.

readonly selectedItems: import("@react-types/shared").Node<T>[];

Whether the select is currently focused.

readonly isFocused: boolean;

Sets whether the select is focused.

setFocused(isFocused: boolean): void;

Controls which item will be auto focused when the menu opens.

readonly focusStrategy: import("@react-types/shared").FocusStrategy | null;

Opens the menu.

open(focusStrategy?: import("@react-types/shared").FocusStrategy | null): void;

Toggles the menu.

toggle(focusStrategy?: import("@react-types/shared").FocusStrategy | null): void;
}
Referenced by
export interface SelectStateOptions<T, M extends SelectionMode = "single"> extends Omit<SelectProps<T, M>, "children">, import("@react-types/shared").CollectionStateBase<T> {}
Referenced by
export interface SliderState {

Values managed by the slider by thumb index.

readonly values: number[];

The default values for each thumb.

readonly defaultValues: number[];

Get the value for the specified thumb.

more
less

@param —

getThumbValue(index: number): number;

Sets the value for the specified thumb. The actual value set will be clamped and rounded according to min/max/step.

more
less

@param —

@param —

setThumbValue(index: number, value: number): void;

Sets value for the specified thumb by percent offset (between 0 and 1).

more
less

@param —

@param —

setThumbPercent(index: number, percent: number): void;

Whether the specific thumb is being dragged.

more
less

@param —

isThumbDragging(index: number): boolean;

Set is dragging on the specified thumb.

more
less

@param —

@param —

setThumbDragging(index: number, dragging: boolean): void;

Currently-focused thumb index.

readonly focusedThumb: number | undefined;

Set focused true on specified thumb. This will remove focus from any thumb that had it before.

more
less

@param —

setFocusedThumb(index: number | undefined): void;

Returns the specified thumb's value as a percentage from 0 to 1.

more
less

@param —

getThumbPercent(index: number): number;

Returns the value as a percent between the min and max of the slider.

more
less

@param —

getValuePercent(value: number): number;

Returns the string label for the specified thumb's value, per props.formatOptions.

more
less

@param —

getThumbValueLabel(index: number): string;

Returns the string label for the value, per props.formatOptions.

more
less

@param —

getFormattedValue(value?: number | number[]): string;

Returns the min allowed value for the specified thumb.

more
less

@param —

getThumbMinValue(index: number): number;

Returns the max allowed value for the specified thumb.

more
less

@param —

getThumbMaxValue(index: number): number;

Converts a percent along track (between 0 and 1) to the corresponding value.

more
less

@param —

getPercentValue(percent: number): number;

Returns if the specified thumb is editable.

more
less

@param —

isThumbEditable(index: number): boolean;

Set the specified thumb's editable state.

more
less

@param —

@param —

setThumbEditable(index: number, editable: boolean): void;

Increments the value of the thumb by the step or page amount.

incrementThumb(index: number, stepSize?: number): void;

Decrements the value of the thumb by the step or page amount.

decrementThumb(index: number, stepSize?: number): void;

The step amount for the slider.

readonly step: number;

The page size for the slider, used to do a bigger step.

readonly pageSize: number;

The orientation of the slider.

readonly orientation: import("@react-types/shared").Orientation;

Whether the slider is disabled.

readonly isDisabled: boolean;
}
Referenced by
export interface SliderStateOptions<T> extends SliderProps<T> {
numberFormatter: NumberFormat;
}
Referenced by
export interface SliderProps<T = number | number[]> extends import("@react-types/shared").RangeInputBase<number>, import("@react-types/shared").ValueBase<T>, import("@react-types/shared").LabelableProps {

The orientation of the Slider.

more
less

@default — 'horizontal'

orientation?: import("@react-types/shared").Orientation;

Whether the whole Slider is disabled.

isDisabled?: boolean;

Fired when the slider stops moving, due to being let go.

onChangeEnd?: (value: T) => void;

The slider's minimum value.

more
less

@default — 0

minValue?: number;

The slider's maximum value.

more
less

@default — 100

maxValue?: number;

The slider's step value.

more
less

@default — 1

step?: number;
}
Referenced by
export interface MultipleSelectionManager extends FocusState {

The type of selection that is allowed in the collection.

readonly selectionMode: import("@react-types/shared").SelectionMode;

The selection behavior for the collection.

readonly selectionBehavior: import("@react-types/shared").SelectionBehavior;

Whether the collection allows empty selection.

readonly disallowEmptySelection?: boolean;

The currently selected keys in the collection.

readonly selectedKeys: Set<import("@react-types/shared").Key>;

Whether the selection is empty.

readonly isEmpty: boolean;

Whether all items in the collection are selected.

readonly isSelectAll: boolean;

The first selected key in the collection.

readonly firstSelectedKey: import("@react-types/shared").Key | null;

The last selected key in the collection.

readonly lastSelectedKey: import("@react-types/shared").Key | null;

The currently disabled keys in the collection.

readonly disabledKeys: Set<import("@react-types/shared").Key>;

Whether disabledKeys applies to selection, actions, or both.

readonly disabledBehavior: import("@react-types/shared").DisabledBehavior;

Returns whether a key is selected.

isSelected(key: import("@react-types/shared").Key): boolean;

Returns whether the current selection is equal to the given selection.

isSelectionEqual(selection: Set<import("@react-types/shared").Key>): boolean;

Extends the selection to the given key.

extendSelection(toKey: import("@react-types/shared").Key): void;

Toggles whether the given key is selected.

toggleSelection(key: import("@react-types/shared").Key): void;

Replaces the selection with only the given key.

replaceSelection(key: import("@react-types/shared").Key): void;

Replaces the selection with the given keys.

setSelectedKeys(keys: Iterable<import("@react-types/shared").Key>): void;

Selects all items in the collection.

selectAll(): void;

Removes all keys from the selection.

clearSelection(): void;

Toggles between select all and an empty selection.

toggleSelectAll(): void;

Toggles, replaces, or extends selection to the given key depending on the pointer event and collection's selection mode.

select(key: import("@react-types/shared").Key, e?: import("@react-types/shared").PressEvent | import("@react-types/shared").LongPressEvent | PointerEvent): void;

Returns whether the given key can be selected.

canSelectItem(key: import("@react-types/shared").Key): boolean;

Returns whether the given key is non-interactive, i.e. both selection and actions are disabled.

isDisabled(key: import("@react-types/shared").Key): boolean;

Sets the selection behavior for the collection.

setSelectionBehavior(selectionBehavior: import("@react-types/shared").SelectionBehavior): void;

Returns whether the given key is a hyperlink.

isLink(key: import("@react-types/shared").Key): boolean;

Returns the props for the given item.

getItemProps(key: import("@react-types/shared").Key): any;

The collection of nodes that the selection manager handles.

collection: import("@react-types/shared").Collection<import("@react-types/shared").Node<unknown>>;
}
Referenced by
export interface MultipleSelectionState extends FocusState {

The type of selection that is allowed in the collection.

readonly selectionMode: import("@react-types/shared").SelectionMode;

The selection behavior for the collection.

readonly selectionBehavior: import("@react-types/shared").SelectionBehavior;

Sets the selection behavior for the collection.

setSelectionBehavior(selectionBehavior: import("@react-types/shared").SelectionBehavior): void;

Whether the collection allows empty selection.

readonly disallowEmptySelection: boolean;

The currently selected keys in the collection.

readonly selectedKeys: import("@react-types/shared").Selection;

Sets the selected keys in the collection.

setSelectedKeys(keys: import("@react-types/shared").Selection): void;

The currently disabled keys in the collection.

readonly disabledKeys: Set<import("@react-types/shared").Key>;

Whether disabledKeys applies to selection, actions, or both.

readonly disabledBehavior: import("@react-types/shared").DisabledBehavior;
}
Referenced by
export interface SingleSelectionState extends FocusState {

Whether the collection allows empty selection.

readonly disallowEmptySelection?: boolean;

The currently selected key in the collection.

readonly selectedKey: import("@react-types/shared").Key;

Sets the selected key in the collection.

setSelectedKey(key: import("@react-types/shared").Key | null): void;
}
export interface FocusState {

Whether the collection is currently focused.

readonly isFocused: boolean;

Sets whether the collection is focused.

setFocused(isFocused: boolean): void;

The current focused key in the collection.

readonly focusedKey: import("@react-types/shared").Key | null;

Whether the first or last child of the focused key should receive focus.

readonly childFocusStrategy: import("@react-types/shared").FocusStrategy | null;

Sets the focused key, and optionally, whether the first or last child of that key should receive focus.

setFocusedKey(key: import("@react-types/shared").Key | null, child?: import("@react-types/shared").FocusStrategy): void;
}
Referenced by
export interface MultipleSelectionStateProps extends import("@react-types/shared").MultipleSelection {

How multiple selection should behave in the collection.

more
less

@default — 'toggle'

selectionBehavior?: import("@react-types/shared").SelectionBehavior;

Whether onSelectionChange should fire even if the new set of keys is the same as the last.

allowDuplicateSelectionEvents?: boolean;

Whether disabledKeys applies to all interactions, or only selection.

more
less

@default — 'all'

disabledBehavior?: import("@react-types/shared").DisabledBehavior;
}
Referenced by
export interface NumberFieldState extends FormValidationState {

The current text value of the input. Updated as the user types, and formatted according to formatOptions on blur.

inputValue: string;

The currently parsed number value, or NaN if a valid number could not be parsed. Updated based on the inputValue as the user types.

numberValue: number;

The default value of the input.

defaultNumberValue: number;

The minimum value of the number field.

minValue?: number;

The maximum value of the number field.

maxValue?: number;

Whether the current value can be incremented according to the maximum value and step.

canIncrement: boolean;

Whether the current value can be decremented according to the minimum value and step.

canDecrement: boolean;

Validates a user input string according to the current locale and format options. Values can be partially entered, and may be valid even if they cannot currently be parsed to a number. Can be used to implement validation as a user types.

validate(value: string): boolean;

Sets the current text value of the input.

setInputValue(val: string): void;

Sets the number value.

setNumberValue(val: number): void;

Commits the current input value. The value is parsed to a number, clamped according to the minimum and maximum values of the field, and snapped to the nearest step value. This will fire the onChange prop with the new value, and if uncontrolled, update the numberValue. Typically this is called when the field is blurred.

more
less

@param — - The value to commit. If not provided, the current input value is used.

commit(value?: string): void;

Increments the current input value to the next step boundary, and fires onChange.

increment(): void;

Decrements the current input value to the next step boundary, and fires onChange.

decrement(): void;

Sets the current value to the maxValue if any, and fires onChange.

incrementToMax(): void;

Sets the current value to the minValue if any, and fires onChange.

decrementToMin(): void;
}
Referenced by
export interface NumberFieldStateOptions extends NumberFieldProps {

The locale that should be used for parsing.

more
less

@default — 'en-US'

locale: string;
}
Referenced by
export interface NumberFieldProps extends import("@react-types/shared").InputBase, import("@react-types/shared").Validation<number>, import("@react-types/shared").FocusableProps, import("@react-types/shared").TextInputBase, import("@react-types/shared").ValueBase<number>, import("@react-types/shared").RangeInputBase<number>, import("@react-types/shared").LabelableProps, import("@react-types/shared").HelpTextProps {

Formatting options for the value displayed in the number field. This also affects what characters are allowed to be typed by the user.

formatOptions?: NumberFormatOptions;

Controls the behavior of the number field when the user blurs the field after editing. 'snap' will clamp the value to the min/max values, and snap to the nearest step value. 'validate' will not clamp the value, and will validate that the value is within the min/max range and on a valid step.

more
less

@default — 'snap'

commitBehavior?: "snap" | "validate";
}
Referenced by
export interface TableProps<T> extends import("@react-types/shared").MultipleSelection, import("@react-types/shared").Sortable, import("@react-types/shared").Expandable {

The elements that make up the table. Includes the TableHeader, TableBody, Columns, and Rows.

children: [ReactElement<TableHeaderProps<T>>, ReactElement<TableBodyProps<T>>];

A list of row keys to disable.

disabledKeys?: Iterable<import("@react-types/shared").Key>;

Whether pressing the escape key should clear selection in the table or not.

more
less

Most experiences should not modify this option as it eliminates a keyboard user's ability to easily clear selection. Only use if the escape key is being handled externally or should not trigger selection clearing contextually.

@default — 'clearSelection'

escapeKeyBehavior?: "clearSelection" | "none";

Whether selection should occur on press up instead of press down.

shouldSelectOnPressUp?: boolean;

The id of the column that displays hierarchical data.

treeColumn?: import("@react-types/shared").Key;
}
export interface TableState<T> extends GridState<T, ITableCollection<T>> {

A collection of rows and columns in the table.

collection: ITableCollection<T>;

Whether the row selection checkboxes should be displayed.

showSelectionCheckboxes: boolean;

The current sorted column and direction.

sortDescriptor: import("@react-types/shared").SortDescriptor | null;

Calls the provided onSortChange handler with the provided column key and sort direction.

sort(columnKey: import("@react-types/shared").Key, direction?: "ascending" | "descending"): void;

Whether keyboard navigation is disabled, such as when the arrow keys should be handled by a component within a cell.

isKeyboardNavigationDisabled: boolean;

Set whether keyboard navigation is disabled, such as when the arrow keys should be handled by a component within a cell.

setKeyboardNavigationDisabled: (val: boolean) => void;

A set of keys for items that are expanded.

expandedKeys: Set<import("@react-types/shared").Key>;

Toggles the expanded state for a row by its key.

toggleKey(key: import("@react-types/shared").Key): void;

The id of the column that displays hierarchical data.

treeColumn: import("@react-types/shared").Key | null;
}
Referenced by
Unexported symbols referenced here
interface GridState<T, C extends IGridCollection<T>> {
collection: C;

A set of keys for rows that are disabled.

disabledKeys: Set<import("@react-types/shared").Key>;

A selection manager to read and update row selection state.

selectionManager: SelectionManager;

Whether keyboard navigation is disabled, such as when the arrow keys should be handled by a component within a cell.

isKeyboardNavigationDisabled: boolean;
}
Referenced by
export interface TableStateProps<T> extends MultipleSelectionStateProps, import("@react-types/shared").Expandable, import("@react-types/shared").Sortable {

The elements that make up the table. Includes the TableHeader, TableBody, Columns, and Rows.

children?: [ReactElement<TableHeaderProps<T>>, ReactElement<TableBodyProps<T>>];

A pre-constructed collection to use instead of building one from items and children.

collection?: ITableCollection<T>;

Whether the row selection checkboxes should be displayed.

showSelectionCheckboxes?: boolean;

Whether the row drag button should be displayed.

more
less

@private —

showDragButtons?: boolean;

@private — - Do not use unless you know what you're doing.

UNSAFE_selectionState?: MultipleSelectionState;

The id of the column that displays hierarchical data.

treeColumn?: import("@react-types/shared").Key;
}
Referenced by
export interface TableHeaderProps<T> {

A list of table columns.

columns?: readonly T[];

A list of Column(s) or a function. If the latter, a list of columns must be provided using the columns prop.

children: ColumnElement<T> | ColumnElement<T>[] | ColumnRenderer<T>;
}
Referenced by
Unexported symbols referenced here
type ColumnElement<T> = ReactElement<ColumnProps<T>>
Referenced by
type ColumnRenderer<T> = (item: T) => ColumnElement<T>
Referenced by
export interface TableBodyProps<T> extends Omit<import("@react-types/shared").AsyncLoadable, "isLoading"> {

The contents of the table body. Supports static items or a function for dynamic rendering.

children: RowElement<T> | RowElement<T>[] | ((item: T) => RowElement<T>);

A list of row objects in the table body used when dynamically rendering rows.

items?: Iterable<T>;

The current loading state of the table.

loadingState?: import("@react-types/shared").LoadingState;
}
Referenced by
Unexported symbols referenced here
type RowElement<T> = ReactElement<RowProps<T>>
Referenced by
export interface ColumnProps<T> {

Rendered contents of the column if children contains child columns.

title?: ReactNode;

Static child columns or content to render as the column header.

children: ReactNode | ColumnElement<T> | ColumnElement<T>[];

A list of child columns used when dynamically rendering nested child columns.

childColumns?: T[];

The width of the column.

width?: ColumnSize | null;

The minimum width of the column.

minWidth?: ColumnStaticSize | null;

The maximum width of the column.

maxWidth?: ColumnStaticSize | null;

The default width of the column.

defaultWidth?: ColumnSize | null;

Whether the column allows resizing.

allowsResizing?: boolean;

Whether the column allows sorting.

allowsSorting?: boolean;

Whether a column is a row header and should be announced by assistive technology during row navigation.

isRowHeader?: boolean;

A string representation of the column's contents, used for accessibility announcements.

textValue?: string;
}
Referenced by

All possible sizes a column can be assigned.

export type ColumnSize = ColumnStaticSize | ColumnDynamicSize
Referenced by

Widths that result in a constant pixel value for the same Table width.

export type ColumnStaticSize = number | `${number}` | `${number}%`
Referenced by

Widths that change size in relation to the remaining space and in ratio to other dynamic columns. All numbers must be integers and greater than 0. FR units take up remaining, if any, space in the table.

export type ColumnDynamicSize = `${number}fr`
Referenced by
export interface RowProps<T> extends import("@react-types/shared").LinkDOMProps {

A list of child item objects used when dynamically rendering row children. Requires the feature flag to be enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.

more
less

@private —

@version — alpha

UNSTABLE_childItems?: Iterable<T>;

Rendered contents of the row or row child items.

children: CellElement | CellElement[] | CellRenderer;

A string representation of the row's contents, used for features like typeahead.

textValue?: string;
}
Referenced by
Unexported symbols referenced here
type CellElement = ReactElement<CellProps>
Referenced by
type CellRenderer = (columnKey: import("@react-types/shared").Key) => CellElement
Referenced by
export interface CellProps {

The contents of the cell.

children: ReactNode;

A string representation of the cell's contents, used for features like typeahead.

textValue?: string;

Indicates how many columns the data cell spans.

colSpan?: number;
}
Referenced by
export interface TableColumnResizeState<T> {

Called to update the state that a resize event has occurred. Returns the new widths for all columns based on the resized column.

updateResizedColumns: (key: import("@react-types/shared").Key, width: number) => Map<import("@react-types/shared").Key, ColumnSize>;

Callback for when onColumnResize has started.

startResize: (key: import("@react-types/shared").Key) => void;

Callback for when onColumnResize has ended.

endResize: () => void;

Gets the current width for the specified column.

getColumnWidth: (key: import("@react-types/shared").Key) => number;

Gets the current minWidth for the specified column.

getColumnMinWidth: (key: import("@react-types/shared").Key) => number;

Gets the current maxWidth for the specified column.

getColumnMaxWidth: (key: import("@react-types/shared").Key) => number;

Key of the currently resizing column.

resizingColumn: import("@react-types/shared").Key | null;

A reference to the table state.

tableState: TableState<T>;

A map of the current column widths.

columnWidths: Map<import("@react-types/shared").Key, number>;
}
Referenced by
export interface TableColumnResizeStateProps<T> {

Current width of the table or table viewport that the columns should be calculated against.

tableWidth: number;

A function that is called to find the default width for a given column.

getDefaultWidth?: (node: GridNode<T>) => ColumnSize | null | undefined;

A function that is called to find the default minWidth for a given column.

getDefaultMinWidth?: (node: GridNode<T>) => ColumnSize | null | undefined;
}
Referenced by
Unexported symbols referenced here
interface GridNode<T> extends import("@react-types/shared").Node<T> {
column?: GridNode<T>;

The number of columns spanned by this cell. Use colSpan instead.

more
less

@deprecated —

colspan?: number;

The number of columns spanned by this cell.

colSpan?: number | null;

The column index of this cell, accounting for any colSpans.

colIndex?: number | null;

The index of this node within its parent, ignoring sibling nodes that aren't of the same type.

indexOfType?: number;
}
Referenced by
export interface ITableCollection<T> extends IGridCollection<T> {

A list of header row nodes in the table.

headerRows: GridNode<T>[];

A list of column nodes in the table.

columns: GridNode<T>[];

A set of column keys that serve as the row header.

rowHeaderColumnKeys: Set<import("@react-types/shared").Key>;

The node that makes up the header of the table.

head?: GridNode<T>;

The node that makes up the body of the table.

body: GridNode<T>;
}
Referenced by
Unexported symbols referenced here
interface IGridCollection<T> extends import("@react-types/shared").Collection<GridNode<T>> {

The number of columns in the grid.

columnCount: number;

A list of rows in the grid.

rows: GridNode<T>[];
}
Referenced by
export interface TabListProps<T> extends import("@react-types/shared").CollectionBase<T>, Omit<import("@react-types/shared").SingleSelection, "disallowEmptySelection" | "selectedKey" | "defaultSelectedKey" | "onSelectionChange"> {

Whether the TabList is disabled. Shows that a selection exists, but is not available in that circumstance.

isDisabled?: boolean;

The currently selected key in the collection (controlled).

selectedKey?: import("@react-types/shared").Key;

The initial selected keys in the collection (uncontrolled).

defaultSelectedKey?: import("@react-types/shared").Key;

Handler that is called when the selection changes.

onSelectionChange?: (key: import("@react-types/shared").Key) => void;
}
Referenced by
export interface TabListStateOptions<T> extends Omit<TabListProps<T>, "children">, import("@react-types/shared").CollectionStateBase<T> {}
Referenced by
export interface TabListState<T> extends SingleSelectListState<T> {

Whether the tab list is disabled.

isDisabled: boolean;
}
Referenced by
export interface ToastState<T> {

Adds a new toast to the queue.

add(content: T, options?: ToastOptions): string;

Closes a toast.

close(key: string): void;

Pauses the timers for all visible toasts.

pauseAll(): void;

Resumes the timers for all visible toasts.

resumeAll(): void;

The visible toasts.

visibleToasts: QueuedToast<T>[];
}
Referenced by
export interface QueuedToast<T> extends ToastOptions {

The content of the toast.

content: T;

A unique key for the toast.

key: string;

A timer for the toast, if a timeout was set.

timer?: Timer;
}
Referenced by
Unexported symbols referenced here
class Timer {
constructor(callback: () => void, delay: number)
reset(delay: number): void;
pause(): void;
resume(): void;
}
Referenced by
export interface ToastStateProps {

The maximum number of toasts to display at a time.

maxVisibleToasts?: number;

Function to wrap updates in (i.e. document.startViewTransition()).

wrapUpdate?: (fn: () => void, action: ToastAction) => void;
}
Referenced by
Unexported symbols referenced here
type ToastAction = "add" | "remove" | "clear"
Referenced by
export interface ToastOptions {

Handler that is called when the toast is closed, either by the user or after a timeout.

onClose?: () => void;

A timeout to automatically close the toast after, in milliseconds.

timeout?: number;
}
Referenced by
export interface ToggleProps extends ToggleStateOptions, import("@react-types/shared").Validation<boolean>, import("@react-types/shared").FocusableProps {

The label for the element.

children?: ReactNode;

The value of the input element, used when submitting an HTML form. See MDN.

value?: string;
}
export interface ToggleState {

Whether the toggle is selected.

readonly isSelected: boolean;

Whether the toggle is selected by default.

readonly defaultSelected: boolean;

Updates selection state.

setSelected(isSelected: boolean): void;

Toggle the selection state.

toggle(): void;
}
Referenced by
export interface ToggleStateOptions extends import("@react-types/shared").InputBase {

Whether the element should be selected (uncontrolled).

defaultSelected?: boolean;

Whether the element should be selected (controlled).

isSelected?: boolean;

Handler that is called when the element's selection state changes.

onChange?: (isSelected: boolean) => void;
}
Referenced by
export interface ToggleGroupProps {

Whether single or multiple selection is enabled.

more
less

@default — 'single'

selectionMode?: "single" | "multiple";

Whether the collection allows empty selection.

disallowEmptySelection?: boolean;

The currently selected keys in the collection (controlled).

selectedKeys?: Iterable<import("@react-types/shared").Key>;

The initial selected keys in the collection (uncontrolled).

defaultSelectedKeys?: Iterable<import("@react-types/shared").Key>;

Handler that is called when the selection changes.

onSelectionChange?: (keys: Set<import("@react-types/shared").Key>) => void;

Whether all items are disabled.

isDisabled?: boolean;
}
Referenced by
export interface ToggleGroupState {

Whether single or multiple selection is enabled.

readonly selectionMode: "single" | "multiple";

Whether all items are disabled.

readonly isDisabled: boolean;

A set of keys for items that are selected.

readonly selectedKeys: Set<import("@react-types/shared").Key>;

Toggles the selected state for an item by its key.

toggleKey(key: import("@react-types/shared").Key): void;

Sets whether the given key is selected.

setSelected(key: import("@react-types/shared").Key, isSelected: boolean): void;

Replaces the set of selected keys.

setSelectedKeys(keys: Set<import("@react-types/shared").Key>): void;
}
Referenced by
export interface TooltipTriggerProps extends OverlayTriggerProps {

Whether the tooltip should be disabled, independent from the trigger.

isDisabled?: boolean;

The delay time for the tooltip to show up. See guidelines.

more
less

@default — 1500

delay?: number;

The delay time for the tooltip to close. See guidelines.

more
less

@default — 500

closeDelay?: number;

By default, opens for both focus and hover. Can be made to open only for focus.

more
less

@default — 'hover'

trigger?: "hover" | "focus";

Whether the tooltip should close when the trigger is pressed.

more
less

@default — true

shouldCloseOnPress?: boolean;
}
Referenced by
export interface TooltipTriggerState {

Whether the tooltip is currently showing.

isOpen: boolean;

Shows the tooltip. By default, the tooltip becomes visible after a delay depending on a global warmup timer. The immediate option shows the tooltip immediately instead.

open(immediate?: boolean): void;

Hides the tooltip.

close(immediate?: boolean): void;
}
Referenced by
export interface TreeProps<T> extends import("@react-types/shared").CollectionStateBase<T>, import("@react-types/shared").Expandable, import("@react-types/shared").MultipleSelection {

Whether disabledKeys applies to all interactions, or only selection.

disabledBehavior?: import("@react-types/shared").DisabledBehavior;
}
Referenced by
export interface TreeState<T> {

A collection of items in the tree.

readonly collection: import("@react-types/shared").Collection<import("@react-types/shared").Node<T>>;

A set of keys for items that are disabled.

readonly disabledKeys: Set<import("@react-types/shared").Key>;

A set of keys for items that are expanded.

readonly expandedKeys: Set<import("@react-types/shared").Key>;

Toggles the expanded state for an item by its key.

toggleKey(key: import("@react-types/shared").Key): void;

Replaces the set of expanded keys.

setExpandedKeys(keys: Set<import("@react-types/shared").Key>): void;

A selection manager to read and update multiple selection state.

readonly selectionManager: SelectionManager;
}
Referenced by
export interface GridLayoutOptions {

The minimum item size.

more
less

@default — 200 x 200

minItemSize?: Size;

The maximum item size.

more
less

@default — Infinity

maxItemSize?: Size;

Whether to preserve the aspect ratio of the minItemSize. By default, grid rows may have variable heights. When preserveAspectRatio is true, all rows will have equal heights.

more
less

@default — false

preserveAspectRatio?: boolean;

The minimum space required between items.

more
less

@default — 18 x 18

minSpace?: Size;

The maximum allowed horizontal space between items.

more
less

@default — Infinity

maxHorizontalSpace?: number;

The maximum number of columns.

more
less

@default — Infinity

maxColumns?: number;

The thickness of the drop indicator.

more
less

@default — 2

dropIndicatorThickness?: number;

The fixed height of a loader element in px. This loader is specifically for "load more" elements rendered when loading more rows at the root level or inside nested row/sections.

more
less

@default — 48

loaderHeight?: number;

The layout direction. When 'rtl', drop target positions ('before'/'after') are computed correctly for right-to-left locales in multi-column grids.

more
less

@default — 'ltr'

direction?: "ltr" | "rtl";
}
Referenced by
export interface ListLayoutOptions {

The primary orientation of the items. Usually this is the direction that the collection scrolls.

more
less

@default — 'vertical'

orientation?: import("@react-types/shared").Orientation;

The fixed size of a row in px with respect to the applied orientation.

more
less

@default — 48

rowSize?: number;

The estimated size of a row in px with respect to the applied orientation, when row sizes are variable.

estimatedRowSize?: number;

The fixed size of a section header in px with respect to the applied orientation.

more
less

@default — 48

headingSize?: number;

The estimated size of a section header in px with respect to the applied orientation, when heading sizes are variable.

estimatedHeadingSize?: number;

The fixed size of a loader element in px with respect to the applied orientation. This loader is specifically for "load more" elements rendered when loading more rows at the root level or inside nested row/sections.

more
less

@default — 48

loaderSize?: number;

The thickness of the drop indicator.

more
less

@default — 2

dropIndicatorThickness?: number;

The gap between items.

more
less

@default — 0

gap?: number;

The padding around the list.

more
less

@default — 0

padding?: number;

The fixed height of a row in px.

more
less

@deprecated — Use rowSize instead.

@default — 48

rowHeight?: number;

The estimated height of a row, when row heights are variable.

more
less

@deprecated — Use estimatedRowSize instead.

estimatedRowHeight?: number;

The fixed height of a section header in px.

more
less

@deprecated — Use headingSize instead.

@default — 48

headingHeight?: number;

The estimated height of a section header, when the height is variable.

more
less

@deprecated — Use estimatedHeadingSize instead.

estimatedHeadingHeight?: number;

The fixed height of a loader element in px. This loader is specifically for "load more" elements rendered when loading more rows at the root level or inside nested row/sections.

more
less

@deprecated — Use loaderSize instead.

@default — 48

loaderHeight?: number;
}
Referenced by
export interface LayoutNode {
node?: import("@react-types/shared").Node<unknown>;
layoutInfo: LayoutInfo;
children?: LayoutNode[];
validRect: Rect;
index?: number;
}
Referenced by
export interface TableLayoutProps extends Omit<ListLayoutOptions, "orientation" | "rowSize" | "estimatedRowSize" | "headingSize" | "estimatedHeadingSize" | "loaderSize"> {

The fixed height of a row in px.

more
less

@default — 48

rowHeight?: number;

The estimated height of a row, when row heights are variable.

estimatedRowHeight?: number;

The fixed height of a section header in px.

more
less

@default — 48

headingHeight?: number;

The estimated height of a section header, when the height is variable.

estimatedHeadingHeight?: number;

The fixed height of a loader element in px. This loader is specifically for "load more" elements rendered when loading more rows at the root level or inside nested row/sections.

more
less

@default — 48

loaderHeight?: number;
columnWidths?: Map<import("@react-types/shared").Key, number>;
}
Referenced by
export interface WaterfallLayoutOptions {

The minimum item size.

more
less

@default — 200 x 200

minItemSize?: Size;

The maximum item size.

more
less

@default — Infinity

maxItemSize?: Size;

The minimum space required between items.

more
less

@default — 18 x 18

minSpace?: Size;

The maximum allowed horizontal space between items.

more
less

@default — Infinity

maxHorizontalSpace?: number;

The maximum number of columns.

more
less

@default — Infinity

maxColumns?: number;

The thickness of the drop indicator.

more
less

@default — 2

dropIndicatorThickness?: number;

The fixed height of a loader element in px. This loader is specifically for "load more" elements rendered when loading more rows at the root level or inside nested row/sections.

more
less

@default — 48

loaderHeight?: number;
}
Referenced by
export interface InvalidationContext<O = any> {
contentChanged?: boolean;
offsetChanged?: boolean;
sizeChanged?: boolean;
itemSizeChanged?: boolean;
layoutOptionsChanged?: boolean;
layoutOptions?: O;
}
Referenced by
export type RectCorner = "topLeft" | "topRight" | "bottomLeft" | "bottomRight"
Referenced by
export interface VirtualizerState<T extends object, V> {
visibleViews: ReusableView<T, V>[];
setVisibleRect: (rect: Rect) => void;
size: Size;
setSize: (size: Size) => void;
contentSize: Size;
virtualizer: Virtualizer<T, V>;
isScrolling: boolean;
startScrolling: () => void;
endScrolling: () => void;
}
Referenced by
Unexported symbols referenced here

The Virtualizer class renders a scrollable collection of data using customizable layouts. It supports very large collections by only rendering visible views to the DOM, reusing them as you scroll. Virtualizer can present any type of view, including non-item views such as section headers and footers.

more
less

Virtualizer uses Layout objects to compute what views should be visible, and how to position and style them. This means that virtualizer can have its items arranged in a stack, a grid, a circle, or any other layout you can think of. The layout can be changed dynamically at runtime as well.

Layouts produce information on what views should appear in the virtualizer, but do not create the views themselves directly. It is the responsibility of the VirtualizerDelegate object to render elements for each layout info. The virtualizer manages a set of ReusableView objects, which are reused as the user scrolls by swapping their content with cached elements returned by the delegate.

class Virtualizer<T extends object, V> {
constructor(options: VirtualizerOptions<T, V>)

The virtualizer delegate. The delegate is used by the virtualizer to create and configure views.

delegate: VirtualizerDelegate<T, V>;

The current content of the virtualizer.

readonly collection: import("@react-types/shared").Collection<T>;

The layout object that determines the visible views.

readonly layout: Layout<T>;

The size of the scrollable content.

readonly contentSize: Size;

The currently visible rectangle.

readonly visibleRect: Rect;

The size of the virtualizer scroll view.

readonly size: Size;

The set of persisted keys that are always present in the DOM, even if not currently in view.

readonly persistedKeys: Set<import("@react-types/shared").Key>;

Returns whether the given key, or an ancestor, is persisted.

isPersistedKey(key: import("@react-types/shared").Key): boolean;

Returns the key for the item view currently at the given point.

keyAtPoint(point: Point): import("@react-types/shared").Key | null;
getVisibleLayoutInfos(): Map<import("@react-types/shared").Key, LayoutInfo>;

Performs layout and updates visible views as needed.

render(opts: VirtualizerRenderOptions<T>): ReusableView<T, V>[];
getVisibleView(key: import("@react-types/shared").Key): ReusableView<T, V> | undefined;
invalidate(context: InvalidationContext): void;
updateItemSize(key: import("@react-types/shared").Key, size: Size): void;
}
Referenced by
interface VirtualizerOptions<T extends object, V> {
delegate: VirtualizerDelegate<T, V>;
collection: import("@react-types/shared").Collection<T>;
layout: Layout<T>;
}
Referenced by
interface VirtualizerDelegate<T extends object, V> {
setVisibleRect(rect: Rect): void;
renderView(type: string, content: T | null): V;
invalidate(ctx: InvalidationContext): void;
}
Referenced by
interface VirtualizerRenderOptions<T extends object, O = any> {
layout: Layout<T>;
collection: import("@react-types/shared").Collection<T>;
persistedKeys?: Set<import("@react-types/shared").Key> | null;
visibleRect: Rect;
size: Size;
invalidationContext: InvalidationContext;
isScrolling: boolean;
layoutOptions?: O;
}
Referenced by

Provides state management for a calendar component. A calendar displays one or more date grids and allows users to select a single date.

export function useCalendarState<T extends DateValue = DateValue, M extends CalendarSelectionMode = "single">(props: CalendarStateOptions<T, M>): CalendarState<M>

Provides state management for a range calendar component. A range calendar displays one or more date grids and allows users to select a contiguous range of dates.

export function useRangeCalendarState<T extends DateValue = DateValue>(props: RangeCalendarStateOptions<T>): RangeCalendarState<T>

Provides state management for a checkbox group component. Provides a name for the group, and manages selection and focus state.

export function useCheckboxGroupState(props?: CheckboxGroupProps): CheckboxGroupState

Returns a list of color channels for a given color space.

export function getColorChannels(colorSpace: ColorSpace): [ColorChannel, ColorChannel, ColorChannel]

Parses a color from a string value. Throws an error if the string could not be parsed.

export function parseColor(value: string): Color

Provides state management for a color area component. Color area allows users to adjust two channels of an HSL, HSB or RGB color value against a two-dimensional gradient background.

export function useColorAreaState(props: ColorAreaProps): ColorAreaState

Provides state management for a color channel field, allowing users to edit the value of an individual color channel.

export function useColorChannelFieldState(props: ColorChannelFieldStateOptions): ColorChannelFieldState

Provides state management for a color field component. Color fields allow users to enter and adjust a hex color value.

export function useColorFieldState(props: ColorFieldProps): ColorFieldState
export function useColorPickerState(props: ColorPickerProps): ColorPickerState

Provides state management for a color slider component. Color sliders allow users to adjust an individual channel of a color value.

export function useColorSliderState(props: ColorSliderStateOptions): ColorSliderState

Provides state management for a color wheel component. Color wheels allow users to adjust the hue of an HSL or HSB color value on a circular track.

export function useColorWheelState(props: ColorWheelProps): ColorWheelState

Provides state management for a combo box component. Handles building a collection of items from props and manages the option selection state of the combo box. In addition, it tracks the input value, focus state, and other properties of the combo box.

export function useComboBoxState<T, M extends SelectionMode = "single">(props: ComboBoxStateOptions<T, M>): ComboBoxState<T, M>

Provides state management for a date field component. A date field allows users to enter and edit date and time values using a keyboard. Each part of a date value is displayed in an individually editable segment.

export function useDateFieldState<T extends DateValue = DateValue>(props: DateFieldStateOptions<T>): DateFieldState

Provides state management for a date picker component. A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.

export function useDatePickerState<T extends DateValue = DateValue>(props: DatePickerStateOptions<T>): DatePickerState

Provides state management for a date range picker component. A date range picker combines two DateFields and a RangeCalendar popover to allow users to enter or select a date and time range.

export function useDateRangePickerState<T extends DateValue = DateValue>(props: DateRangePickerStateOptions<T>): DateRangePickerState

Provides state management for a time field component. A time field allows users to enter and edit time values using a keyboard. Each part of a time value is displayed in an individually editable segment.

export function useTimeFieldState<T extends TimeValue = TimeValue>(props: TimeFieldStateOptions<T>): TimeFieldState

Manages state for a disclosure widget. Tracks whether the disclosure is expanded, and provides methods to toggle this state.

export function useDisclosureState(props: DisclosureProps): DisclosureState

Manages state for a group of disclosures, e.g. an accordion. It supports both single and multiple expanded items.

export function useDisclosureGroupState(props: DisclosureGroupProps): DisclosureGroupState

Manages state for a draggable collection.

export function useDraggableCollectionState<T = object>(props: DraggableCollectionStateOptions<T>): DraggableCollectionState

Manages state for a droppable collection.

export function useDroppableCollectionState(props: DroppableCollectionStateOptions): DroppableCollectionState
export let Item: <T>(props: import("@react-types/shared").ItemProps<T>) => Element = ...
export let Section: <T>(props: import("@react-types/shared").SectionProps<T>) => Element = ...
export function useCollection<T, C extends import("@react-types/shared").Collection<import("@react-types/shared").Node<T>> = import("@react-types/shared").Collection<import("@react-types/shared").Node<T>>>(props: CollectionOptions<T, C>, factory: CollectionFactory<T, C>, context?: unknown): C
Unexported symbols referenced here
interface CollectionOptions<T, C extends import("@react-types/shared").Collection<import("@react-types/shared").Node<T>>> extends Omit<import("@react-types/shared").CollectionStateBase<T, C>, "children"> {
children?: ReactElement<any> | null | (ReactElement<any> | null)[] | ((item: T) => ReactElement<any> | null);
}
Referenced by
type CollectionFactory<T, C extends import("@react-types/shared").Collection<import("@react-types/shared").Node<T>>> = (node: Iterable<import("@react-types/shared").Node<T>>) => C
Referenced by

Manages state for an immutable async loaded list data structure, and provides convenience methods to update the data over time. Manages loading and error states, pagination, and sorting.

export function useAsyncList<T, C = string>(options: AsyncListOptions<T, C>): AsyncListData<T>

Manages state for an immutable list data structure, and provides convenience methods to update the data over time.

export function useListData<T>(options: ListOptions<T>): ListData<T>

Manages state for an immutable tree data structure, and provides convenience methods to update the data over time.

export function useTreeData<T extends object>(options: TreeOptions<T>): TreeData<T>

Provides state management for list-like components. Handles building a collection of items from props, and manages multiple selection state.

export function useListState<T>(props: ListProps<T>): ListState<T>

Filters a collection using the provided filter function and returns a new ListState.

export function UNSTABLE_useFilteredListState<T>(state: ListState<T>, filterFn: ((nodeValue: string, node: import("@react-types/shared").Node<T>) => boolean) | null | undefined): ListState<T>

Provides state management for list-like components with single selection. Handles building a collection of items from props, and manages selection state.

export function useSingleSelectListState<T extends object>(props: SingleSelectListProps<T>): SingleSelectListState<T>

Manages state for a menu trigger. Tracks whether the menu is currently open, and controls which item will receive focus when it opens. Also tracks the open submenus within the menu tree via their trigger keys.

export function useMenuTriggerState(props: MenuTriggerProps): RootMenuTriggerState

Manages state for a submenu trigger. Tracks whether the submenu is currently open, the level of the submenu, and controls which item will receive focus when it opens.

export function useSubmenuTriggerState(props: SubmenuTriggerProps, state: RootMenuTriggerState): SubmenuTriggerState

Provides state management for a number field component. Number fields allow users to enter a number, and increment or decrement the value using stepper buttons.

export function useNumberFieldState(props: NumberFieldStateOptions): NumberFieldState

Manages state for an overlay trigger. Tracks whether the overlay is open, and provides methods to toggle this state.

export function useOverlayTriggerState(props: OverlayTriggerProps): OverlayTriggerState

Provides state management for a radio group component. Provides a name for the group, and manages selection and focus state.

export function useRadioGroupState(props: RadioGroupProps): RadioGroupState

Provides state management for a search field.

export function useSearchFieldState(props: SearchFieldProps): SearchFieldState

Provides state management for a select component. Handles building a collection of items from props, handles the open state for the popup menu, and manages multiple selection state.

export function useSelectState<T, M extends SelectionMode = "single">(props: SelectStateOptions<T, M>): SelectState<T, M>

Provides state management for a slider component. Stores values for all thumbs, formats values for localization, and provides methods to update the position of any thumbs.

more
less

@param —

export function useSliderState<T extends number | number[]>(props: SliderStateOptions<T>): SliderState

Manages state for multiple selection and focus in a collection.

export function useMultipleSelectionState(props: MultipleSelectionStateProps): MultipleSelectionState

Provides state management for a table component. Handles building a collection of columns and rows from props. In addition, it tracks row selection and manages sort order changes.

export function useTableState<T extends object>(props: TableStateProps<T>): TableState<T>

Filters a collection using the provided filter function and returns a new TableState.

export function UNSTABLE_useFilteredTableState<T extends object>(state: TableState<T>, filterFn: ((nodeValue: string, node: import("@react-types/shared").Node<T>) => boolean) | null | undefined): TableState<T>

A TableHeader is a container for the Column elements in a Table. Columns can be statically defined as children, or generated dynamically using a function based on the data passed to the columns prop.

export let TableHeader: <T>(props: TableHeaderProps<T>) => Element = ...

A TableBody is a container for the Row elements of a Table. Rows can be statically defined as children, or generated dynamically using a function based on the data passed to the items prop.

export let TableBody: <T>(props: TableBodyProps<T>) => Element = ...

A Column represents a field of each item within a Table. Columns may also contain nested Column elements to represent column groups. Nested columns can be statically defined as children, or dynamically generated using a function based on the childColumns prop.

export let Column: <T>(props: ColumnProps<T>) => Element = ...

A Row represents a single item in a Table and contains Cell elements for each column. Cells can be statically defined as children, or generated dynamically using a function based on the columns defined in the TableHeader.

export let Row: <T>(props: RowProps<T>) => Element = ...

A Cell represents the value of a single Column within a Table Row.

export let Cell: (props: CellProps) => Element = ...

Provides column width state management for a table component with column resizing support. Handles building a map of column widths calculated from the table's width and any provided column width information from the collection. In addition, it tracks the currently resizing column and provides callbacks for updating the widths upon resize operations.

more
less

@param — - Props for the table.

@param — - State for the table, as returned by useTableState.

export function useTableColumnResizeState<T>(props: TableColumnResizeStateProps<T>, state: TableState<T>): TableColumnResizeState<T>

Provides state management for a Tabs component. Tabs include a TabList which tracks which tab is currently selected and displays the content associated with that Tab in a TabPanel.

export function useTabListState<T extends object>(props: TabListStateOptions<T>): TabListState<T>

Provides state management for a toast queue. Toasts display brief, temporary notifications of actions, errors, or other events in an application.

export function useToastState<T>(props?: ToastStateProps): ToastState<T>

A ToastQueue manages the order of toasts.

export class ToastQueue<T> {
constructor(options?: ToastStateProps)

The currently visible toasts.

visibleToasts: QueuedToast<T>[];

Subscribes to updates to the visible toasts.

subscribe(fn: () => void): () => void;

Adds a new toast to the queue.

add(content: T, options?: ToastOptions): string;

Closes a toast.

close(key: string): void;

Pauses the timers for all visible toasts.

pauseAll(): void;

Resumes the timers for all visible toasts.

resumeAll(): void;
clear(): void;
}
Referenced by

Subscribes to a provided toast queue and provides methods to update it.

export function useToastQueue<T>(queue: ToastQueue<T>): ToastState<T>

Provides state management for toggle components like checkboxes and switches.

export function useToggleState(props?: ToggleStateOptions): ToggleState

Manages state for a group of toggles. It supports both single and multiple selected items.

export function useToggleGroupState(props: ToggleGroupProps): ToggleGroupState

Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides methods to toggle this state. Ensures only one tooltip is open at a time and controls the delay for showing a tooltip.

export function useTooltipTriggerState(props?: TooltipTriggerProps): TooltipTriggerState

Provides state management for tree-like components. Handles building a collection of items from props, item expanded state, and manages multiple selection state.

export function useTreeState<T>(props: TreeProps<T>): TreeState<T>
export const FormValidationContext: Context<import("@react-types/shared").ValidationErrors> = ...
export function useVirtualizerState<T extends object, V, O = any>(opts: VirtualizerProps<T, V, O>): VirtualizerState<T, V>
Unexported symbols referenced here
interface VirtualizerProps<T extends object, V, O> {
renderView(type: string, content: T | null): V;
layout: Layout<T>;
collection: import("@react-types/shared").Collection<T>;
onVisibleRectChange(rect: Rect): void;
persistedKeys?: Set<import("@react-types/shared").Key> | null;
layoutOptions?: O;
allowsWindowScrolling?: boolean;
}
Referenced by

Virtualizer supports arbitrary layout objects, which compute what items are visible, and how to position and style them. However, layouts do not render items directly. Instead, layouts produce lightweight LayoutInfo objects which describe various properties of an item, such as its position and size. The Virtualizer is then responsible for creating the actual views as needed, based on this layout information.

more
less

Every layout extends from the Layout abstract base class. Layouts must implement the getVisibleLayoutInfos, getLayoutInfo, and getContentSize methods. All other methods can be optionally overridden to implement custom behavior.

export class Layout<T extends object = import("@react-types/shared").Node<any>, O = any> implements import("@react-types/shared").LayoutDelegate {

The Virtualizer the layout is currently attached to.

virtualizer: Virtualizer<T, any> | null;

Returns an array of LayoutInfo objects which are inside the given rectangle. Should be implemented by subclasses.

more
less

@param — The rectangle that should contain the returned LayoutInfo objects.

getVisibleLayoutInfos(rect: Rect): LayoutInfo[];

Returns a LayoutInfo for the given key. Should be implemented by subclasses.

more
less

@param — The key of the LayoutInfo to retrieve.

getLayoutInfo(key: import("@react-types/shared").Key): LayoutInfo | null;

Returns size of the content. By default, it returns virtualizer's size.

getContentSize(): Size;

Returns whether the layout should invalidate in response to visible rectangle changes. By default, it only invalidates when the virtualizer's size changes. Return true always to make the layout invalidate while scrolling (e.g. sticky headers).

shouldInvalidate(newRect: Rect, oldRect: Rect): boolean;

Returns whether the layout should invalidate when the layout options change. By default it invalidates when the object identity changes. Override this method to optimize layout updates based on specific option changes.

shouldInvalidateLayoutOptions(newOptions: O, oldOptions: O): boolean;

This method allows the layout to perform any pre-computation it needs to in order to prepare LayoutInfos for retrieval. Called by the virtualizer before getVisibleLayoutInfos or getLayoutInfo are called.

update(invalidationContext: InvalidationContext<O>): void;

Updates the size of the given item.

updateItemSize(key: import("@react-types/shared").Key, size: Size): boolean;

Returns a LayoutInfo for the given drop target.

getDropTargetLayoutInfo(target: import("@react-types/shared").ItemDropTarget): LayoutInfo;

@private —

getItemRect(key: import("@react-types/shared").Key): Rect | null;

@private —

getVisibleRect(): Rect;
}
Referenced by

Instances of this lightweight class are created by Layout subclasses to represent each item in the Virtualizer. LayoutInfo objects describe various properties of an item, such as its position and size, and style information. The virtualizer uses this information when creating actual DOM elements to display.

export class LayoutInfo {

@param — The type of element represented by this LayoutInfo. Should match the type of the corresponding collection node.

more
less

@param — A unique key for this LayoutInfo. Should match the key of the corresponding collection node.

@param — The rectangle describing the size and position of this element.

constructor(type: string, key: import("@react-types/shared").Key, rect: Rect)

The type of element represented by this LayoutInfo. Should match the type of the corresponding collection node.

type: string;

A unique key for this LayoutInfo. Should match the key of the corresponding collection node.

key: import("@react-types/shared").Key;

The key for a parent LayoutInfo, if any.

parentKey: import("@react-types/shared").Key | null;

Content for this item if it was generated by the layout rather than coming from the Collection.

content: any | null;

The rectangle describing the size and position of this element.

rect: Rect;

Whether the size is estimated. false by default. Items with estimated sizes will be measured the first time they are added to the DOM. The estimated size is used to calculate the size and position of the scrollbar.

more
less

@default — false

estimatedSize: boolean;

Whether the layout info sticks to the viewport when scrolling.

more
less

@default — false

isSticky: boolean;

The element's opacity.

more
less

@default — 1

opacity: number;

A CSS transform string to apply to the element. null by default.

transform: string | null;

The z-index of the element. 0 by default.

zIndex: number;

Whether the element allows its contents to overflow its container.

more
less

@default — false

allowOverflow: boolean;

Returns a copy of the LayoutInfo.

copy(): LayoutInfo;
}
Referenced by
export class Point {
constructor(x?: number, y?: number)

The x-coordinate of the point.

x: number;

The y-coordinate of the point.

y: number;

Returns a copy of this point.

copy(): Point;

Checks if two points are equal.

equals(point: Point): boolean;

Returns true if this point is the origin.

isOrigin(): boolean;
}
Referenced by

Represents a rectangle.

export class Rect {
constructor(x?: number, y?: number, width?: number, height?: number)

The x-coordinate of the rectangle.

x: number;

The y-coordinate of the rectangle.

y: number;

The width of the rectangle.

width: number;

The height of the rectangle.

height: number;
get maxX(): number;
get maxY(): number;
get area(): number;
get topLeft(): Point;
get topRight(): Point;
get bottomLeft(): Point;
get bottomRight(): Point;

Returns whether this rectangle intersects another rectangle.

more
less

@param — - The rectangle to check.

intersects(rect: Rect): boolean;

Returns whether this rectangle fully contains another rectangle.

more
less

@param — - The rectangle to check.

containsRect(rect: Rect): boolean;

Returns whether the rectangle contains the given point.

more
less

@param — - The point to check.

containsPoint(point: Point): boolean;

Returns the first corner of this rectangle (from top to bottom, left to right) that is contained in the given rectangle, or null of the rectangles do not intersect.

more
less

@param — - The rectangle to check.

getCornerInRect(rect: Rect): RectCorner | null;
equals(rect: Rect): boolean;
pointEquals(point: Point | Rect): boolean;
sizeEquals(size: Size | Rect): boolean;

Returns the union of this Rect and another.

union(other: Rect): Rect;

Returns the intersection of this Rect with another. If the rectangles do not intersect, an all zero Rect is returned.

intersection(other: Rect): Rect;

Returns a copy of this rectangle.

copy(): Rect;
}
Referenced by

Virtualizer creates instances of the ReusableView class to represent views currently being displayed.

export class ReusableView<T extends object, V> {
constructor(virtualizer: Virtualizer<T, V>, viewType: string)

The Virtualizer this view is a part of.

virtualizer: Virtualizer<T, V>;

The LayoutInfo this view is currently representing.

layoutInfo: LayoutInfo | null;

The content currently being displayed by this view, set by the virtualizer.

content: T | null;
rendered: V | null;
viewType: string;
children: Set<ChildView<T, V>>;
reusableViews: Map<string, ChildView<T, V>[]>;

Prepares the view for reuse. Called just before the view is removed from the DOM.

prepareForReuse(): void;
getReusableView(reuseType: string): ChildView<T, V>;
reuseChild(child: ChildView<T, V>): void;
}
Referenced by
Unexported symbols referenced here
class ChildView<T extends object, V> extends ReusableView<T, V> {
constructor(virtualizer: Virtualizer<T, V>, parent: ReusableView<T, V>, viewType: string)
parent: ReusableView<T, V>;
}
Referenced by
export class Size {
constructor(width?: number, height?: number)
width: number;
height: number;

Returns a copy of this size.

copy(): Size;

Returns whether this size is equal to another one.

equals(other: Size): boolean;
get area(): number;
}
Referenced by

GridLayout is a virtualizer Layout implementation that arranges its items in a grid. The items are sized between a minimum and maximum size depending on the width of the container.

export class GridLayout<T, O extends GridLayoutOptions = GridLayoutOptions> extends Layout<import("@react-types/shared").Node<T>, O> implements import("@react-types/shared").DropTargetDelegate {
gap: Size;
dropIndicatorThickness: number;
numColumns: number;
direction: "ltr" | "rtl";
shouldInvalidateLayoutOptions(newOptions: O, oldOptions: O): boolean;
update(invalidationContext: InvalidationContext<O>): void;
getLayoutInfo(key: import("@react-types/shared").Key): LayoutInfo | null;
getContentSize(): Size;
getVisibleLayoutInfos(rect: Rect): LayoutInfo[];
updateItemSize(key: import("@react-types/shared").Key, size: Size): boolean;
getDropTargetFromPoint(x: number, y: number, isValidDropTarget: (target: import("@react-types/shared").DropTarget) => boolean): import("@react-types/shared").DropTarget;
getDropTargetLayoutInfo(target: import("@react-types/shared").ItemDropTarget): LayoutInfo;
}

ListLayout is a virtualizer Layout implementation that arranges its items in a stack along its applied orientation. It supports both fixed and variable size items.

export class ListLayout<T, O extends ListLayoutOptions = ListLayoutOptions> extends Layout<import("@react-types/shared").Node<T>, O> implements import("@react-types/shared").DropTargetDelegate {

Creates a new ListLayout with options. See the list of properties below for a description of the options that can be provided.

constructor(options?: ListLayoutOptions)
rowSize: number | null;
orientation: import("@react-types/shared").Orientation;
estimatedRowSize: number | null;
headingSize: number | null;
estimatedHeadingSize: number | null;
loaderSize: number | null;
dropIndicatorThickness: number;
gap: number;
padding: number;
layoutNodes: Map<import("@react-types/shared").Key, LayoutNode>;
contentSize: Size;
lastCollection: import("@react-types/shared").Collection<import("@react-types/shared").Node<T>> | null;
rootNodes: LayoutNode[];

The rectangle containing currently valid layout infos.

validRect: Rect;

The rectangle of requested layout infos so far.

requestedRect: Rect;
protected get collection(): Collection<Node<T>>;
protected get rowHeight(): number | null;
protected get estimatedRowHeight(): number | null;
protected get headingHeight(): number | null;
protected get estimatedHeadingHeight(): number | null;
protected get loaderHeight(): number | null;
getLayoutInfo(key: import("@react-types/shared").Key): LayoutInfo | null;
getVisibleLayoutInfos(rect: Rect): LayoutInfo[];
layoutIfNeeded(rect: Rect): void;
isVisible(node: LayoutNode, rect: Rect): boolean;
shouldInvalidateEverything(invalidationContext: InvalidationContext<O>): boolean;
shouldInvalidateLayoutOptions(newOptions: O, oldOptions: O): boolean;
update(invalidationContext: InvalidationContext<O>): void;
buildCollection(offset?: number): LayoutNode[];
isValid(node: import("@react-types/shared").Node<T>, offset: number): boolean;
buildChild(node: import("@react-types/shared").Node<T>, x: number, y: number, parentKey: import("@react-types/shared").Key | null): LayoutNode;
buildNode(node: import("@react-types/shared").Node<T>, x: number, y: number): LayoutNode;
buildLoader(node: import("@react-types/shared").Node<T>, x: number, y: number): LayoutNode;
buildSection(node: import("@react-types/shared").Node<T>, x: number, y: number): LayoutNode;
buildSectionHeader(node: import("@react-types/shared").Node<T>, x: number, y: number): LayoutNode;
buildItem(node: import("@react-types/shared").Node<T>, x: number, y: number): LayoutNode;
updateItemSize(key: import("@react-types/shared").Key, size: Size): boolean;
getContentSize(): Size;
getDropTargetFromPoint(x: number, y: number, isValidDropTarget: (target: import("@react-types/shared").DropTarget) => boolean): import("@react-types/shared").DropTarget | null;
getDropTargetLayoutInfo(target: import("@react-types/shared").ItemDropTarget): LayoutInfo;
}
Referenced by

TableLayout is a virtualizer Layout implementation that arranges items in rows and columns.

export class TableLayout<T, O extends TableLayoutProps = TableLayoutProps> extends ListLayout<T, O> {
constructor(options?: TableLayoutProps)
lastCollection: ITableCollection<T> | null;
protected get collection(): TableCollection<T>;
protected get rowHeight(): number | null;
protected get estimatedRowHeight(): number | null;
protected get headingHeight(): number | null;
protected get estimatedHeadingHeight(): number | null;
protected get loaderHeight(): number | null;
shouldInvalidateLayoutOptions(newOptions: O, oldOptions: O): boolean;
update(invalidationContext: InvalidationContext<O>): void;
buildCollection(): LayoutNode[];
buildTableHeader(): LayoutNode;
buildHeaderRow(headerRow: GridNode<T>, x: number, y: number): LayoutNode;
getEstimatedRowHeight(): number;
buildColumn(node: GridNode<T>, x: number, y: number): LayoutNode;
isStickyColumn(node: GridNode<T>): boolean;
buildBody(y: number): LayoutNode;
buildRowGroup(y: number, node: GridNode<T>): LayoutNode;
buildLoader(node: GridNode<T>, x: number, y: number): LayoutNode;
buildNode(node: GridNode<T>, x: number, y: number): LayoutNode;
buildRow(node: GridNode<T>, x: number, y: number): LayoutNode;
buildCell(node: GridNode<T>, x: number, y: number): LayoutNode;
getVisibleLayoutInfos(rect: Rect): LayoutInfo[];
getDropTargetFromPoint(x: number, y: number, isValidDropTarget: (target: import("@react-types/shared").DropTarget) => boolean): import("@react-types/shared").DropTarget | null;
getDropTargetLayoutInfo(target: import("@react-types/shared").ItemDropTarget): LayoutInfo;
}
export class WaterfallLayout<T extends object, O extends WaterfallLayoutOptions = WaterfallLayoutOptions> extends Layout<import("@react-types/shared").Node<T>, O> implements import("@react-types/shared").LayoutDelegate, import("@react-types/shared").DropTargetDelegate {
numColumns: number;
dropIndicatorThickness: number;
shouldInvalidateLayoutOptions(newOptions: O, oldOptions: O): boolean;
update(invalidationContext: InvalidationContext<O>): void;
getLayoutInfo(key: import("@react-types/shared").Key): LayoutInfo;
getContentSize(): Size;
getVisibleLayoutInfos(rect: Rect): LayoutInfo[];
updateItemSize(key: import("@react-types/shared").Key, size: Size): boolean;
getKeyRightOf(key: import("@react-types/shared").Key): import("@react-types/shared").Key | null;
getKeyLeftOf(key: import("@react-types/shared").Key): import("@react-types/shared").Key | null;
getKeyRange(from: import("@react-types/shared").Key, to: import("@react-types/shared").Key): import("@react-types/shared").Key[];
getDropTargetFromPoint(x: number, y: number): import("@react-types/shared").DropTarget;
}
}