Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adobe/react-spectrum
/ functions
Functions
8,778 in github.com/adobe/react-spectrum
⨍
Functions
8,778
◇
Types & classes
2,226
↓ 587 callers
Function
useContextProps
( props: T & SlotProps, ref: ForwardedRef<E> | undefined, context: Context<ContextValue<U, E>> )
packages/react-aria-components/src/utils.tsx:314
↓ 374 callers
Method
push
(name: string, children: ReactNode)
packages/dev/s2-docs/src/TypePopover.tsx:9
↓ 301 callers
Method
filter
Filters the collection using the given function.
packages/@react-types/shared/src/collections.d.ts:195
↓ 290 callers
Function
action
(previousState: State, formData: FormData)
packages/@adobe/react-spectrum/stories/form/Form.stories.tsx:975
↓ 280 callers
Method
has
Returns whether the drag contains data of the given type.
packages/@react-types/shared/src/dnd.d.ts:191
↓ 232 callers
Function
mergeProps
(...args: T)
packages/react-aria/src/utils/mergeProps.ts:41
↓ 231 callers
Function
act
packages/@react-aria/test-utils/src/act.ts:23
↓ 223 callers
Method
slice
Create a new list containing a subset of the segments.
packages/@react-spectrum/ai/src/TokenSegmentList.ts:357
↓ 210 callers
Function
classNames
( cssModule: {[key: string]: string}, ...values: Array<string | Object | undefined> )
packages/@adobe/react-spectrum/src/utils/classNames.ts:28
↓ 184 callers
Method
fn
(n: number, k = (n + hue / 60) % 6)
packages/react-stately/src/color/Color.ts:577
↓ 168 callers
Method
focus
()
packages/@react-types/shared/src/refs.d.ts:23
↓ 165 callers
Method
format
* Formats a date as a string according to the locale and format options passed to the * constructor.
packages/@internationalized/date/src/DateFormatter.ts:34
↓ 158 callers
Function
filterDOMProps
( props: DOMProps & AriaLabelingProps & LinkDOMProps & GlobalDOMAttributes, opts: Options = {} )
packages/react-aria/src/utils/filterDOMProps.ts:99
↓ 158 callers
Function
useLocale
()
packages/react-aria/src/i18n/I18nProvider.tsx:86
↓ 156 callers
Method
add
Adds a new toast to the queue.
packages/react-stately/src/toast/useToastState.ts:43
↓ 154 callers
Method
toString
Converts the color to a string in the given format.
packages/react-stately/src/color/types.ts:35
↓ 116 callers
Method
setup
()
packages/react-aria/src/dnd/DragManager.ts:194
↓ 112 callers
Function
useLocalizedStringFormatter
(strings: LocalizedStrings<K, T>, packageName?: string)
packages/react-aria/src/i18n/useLocalizedStringFormatter.ts:55
↓ 109 callers
Method
parse
(value: string)
packages/react-stately/src/color/Color.ts:269
↓ 105 callers
Method
set
* Returns a new `Time` with the given fields set to the provided values. Other fields will be * constrained accordingly.
packages/@internationalized/date/src/CalendarDate.ts:204
↓ 101 callers
Function
render
(children, scale = 'medium')
packages/@adobe/react-spectrum/test/table/TableTests.js:211
↓ 95 callers
Function
getEventTarget
(event: T)
packages/react-aria/src/utils/shadowdom/DOMFunctions.ts:75
↓ 93 callers
Method
set
Sets the given field.
packages/react-stately/src/datepicker/IncompleteDate.ts:102
↓ 86 callers
Function
useId
(defaultId?: string)
packages/react-aria/src/utils/useId.ts:39
↓ 84 callers
Method
getItem
(key: Key)
packages/react-aria-components/src/TreeDropTargetDelegate.ts:12
↓ 80 callers
Function
render
(props = {})
packages/react-aria/stories/grid/useGrid.stories.tsx:46
↓ 79 callers
Method
remove
* Removes items from the list by their keys. * * @param keys - The keys of the item to remove.
packages/react-stately/src/data/useListData.ts:101
↓ 78 callers
Function
useStyleProps
( props: T, handlers: StyleHandlers = baseStyleProps, options: StylePropsOptions = {} )
packages/@adobe/react-spectrum/src/utils/styleProps.ts:276
↓ 77 callers
Function
useListData
(options: ListOptions<T>)
packages/react-stately/src/data/useListData.ts:157
↓ 75 callers
Method
sort
Calls the provided onSortChange handler with the provided column key and sort direction.
packages/react-stately/src/table/useTableState.ts:62
↓ 74 callers
Method
addEventListener
()
packages/react-aria/src/collections/Document.ts:222
↓ 73 callers
Function
require
(id)
packages/dev/test-utils/src/ssrUtils.js:27
↓ 72 callers
Function
render
(args)
packages/react-aria-components/stories/ListBox.stories.tsx:304
↓ 72 callers
Function
useHover
(props: HoverProps)
packages/react-aria/src/interactions/useHover.ts:92
↓ 69 callers
Method
delete
Delete text at a position using a segmenter.
packages/@react-spectrum/ai/src/TokenSegmentList.ts:301
↓ 67 callers
Function
useFocusRing
(props: AriaFocusRingProps = {})
packages/react-aria/src/focus/useFocusRing.ts:40
↓ 65 callers
Method
getItem
* Gets an item from the list by key. * * @param key - The key of the item to retrieve.
packages/react-stately/src/data/useListData.ts:56
↓ 65 callers
Method
getItem
Get an item by its key.
packages/@react-types/shared/src/collections.d.ts:171
↓ 65 callers
Function
useRenderProps
( props: RenderPropsHookOptions<T, E> )
packages/react-aria-components/src/utils.tsx:220
↓ 65 callers
Function
useSpectrumContextProps
( props: T & SlotProps, ref: ForwardedRef<E>, context: Context<ContextValue<U, E>> )
packages/@react-spectrum/s2/src/useSpectrumContextProps.ts:21
↓ 62 callers
Method
removeEventListener
()
packages/react-aria/src/collections/Document.ts:223
↓ 60 callers
Function
nodeContains
( node: Node | Element | null | undefined, otherNode: Node | Element | null | undefined )
packages/react-aria/src/utils/shadowdom/DOMFunctions.ts:11
↓ 60 callers
Function
testSSR
( filename: string, source: string, runAfterServer?: () => void )
packages/dev/test-utils/src/testSSR.tsx:33
↓ 59 callers
Method
getText
Returns the data for the given type as a string.
packages/@react-types/shared/src/dnd.d.ts:74
↓ 57 callers
Function
getAllowedOverrides
({width = true, height = false, font = false} = {})
packages/@react-spectrum/s2/src/style-utils.ts:417
↓ 57 callers
Function
useAsyncList
(options: AsyncListOptions<T, C>)
packages/react-stately/src/data/useAsyncList.ts:281
↓ 56 callers
Function
focusRing
()
packages/@react-spectrum/s2/style/index.ts:78
↓ 56 callers
Function
rerender
(tree, children, scale = 'medium')
packages/@adobe/react-spectrum/test/table/TableTests.js:224
↓ 53 callers
Function
composeRenderProps
( // https://stackoverflow.com/questions/60898079/typescript-type-t-or-function-t-usage value: T extends a
packages/react-aria-components/src/utils.tsx:273
↓ 53 callers
Function
useDOMRef
( ref: DOMRef<T> )
packages/@adobe/react-spectrum/src/utils/useDOMRef.ts:47
↓ 52 callers
Method
setup
(delegate: DropTargetDelegate, state: TreeState<T>, direction: Direction)
packages/react-aria-components/src/TreeDropTargetDelegate.ts:50
↓ 50 callers
Function
useProviderProps
(props: T)
packages/@adobe/react-spectrum/src/provider/Provider.tsx:221
↓ 49 callers
Function
chain
(...callbacks: any[])
packages/react-aria/src/utils/chain.ts:16
↓ 49 callers
Method
close
* Closes a toast.
packages/react-stately/src/toast/useToastState.ts:47
↓ 49 callers
Method
createElement
(type: string)
packages/react-aria/src/collections/Document.ts:452
↓ 49 callers
Method
createTester
* Creates an aria pattern tester, inheriting the options provided to the original user.
packages/@react-aria/test-utils/src/user.ts:145
↓ 47 callers
Method
isSelected
Returns whether the given date is currently selected.
packages/react-stately/src/calendar/types.ts:163
↓ 46 callers
Function
render
( menu: React.ReactElement, {isDisabled, ...props}: any = {}, menuProps = {} )
packages/@adobe/react-spectrum/stories/menu/MenuTrigger.stories.tsx:734
↓ 45 callers
Method
compare
* Compares this time with another. A negative result indicates that this time is before the given * one, and a positive time indicates that it is a
packages/@internationalized/date/src/CalendarDate.ts:225
↓ 45 callers
Function
useDOMRef
( ref: DOMRef<T> )
packages/@react-spectrum/s2/src/useDOMRef.ts:41
↓ 44 callers
Function
render
(props: any = {})
packages/@adobe/react-spectrum/stories/numberfield/NumberField.stories.tsx:433
↓ 43 callers
Function
useObjectRef
( ref?: ((instance: T | null) => (() => void) | void) | MutableRefObject<T | null> | null )
packages/react-aria/src/utils/useObjectRef.ts:24
↓ 42 callers
Function
fn
(t, k)
packages/dev/parcel-packager-docs/DocsPackager.js:82
↓ 42 callers
Function
getActiveElement
(doc: Document = document)
packages/react-aria/src/utils/shadowdom/DOMFunctions.ts:50
↓ 42 callers
Function
pressScale
( ref: RefObject<HTMLElement | null>, style?: CSSProperties | ((renderProps: R) => CSSProperties) )
packages/@react-spectrum/s2/src/pressScale.ts:36
↓ 42 callers
Function
useControlledState
( value: T, defaultValue: T, onChange?: (v: C, ...args: any[]) => void )
packages/react-stately/src/utils/useControlledState.ts:31
↓ 40 callers
Method
UNSAFE_getDOMNode
()
packages/@react-types/shared/src/refs.d.ts:16
↓ 40 callers
Function
baseColor
( base: BaseColor | C )
packages/@react-spectrum/s2/style/spectrum-theme.ts:241
↓ 39 callers
Function
parseColor
(value: string)
packages/react-stately/src/color/Color.ts:29
↓ 38 callers
Function
categorizeArgTypes
(category: string, args: string[])
packages/@react-spectrum/s2/stories/utils.tsx:74
↓ 38 callers
Function
useDragAndDrop
(options: DragAndDropOptions<T>)
packages/react-aria-components/src/useDragAndDrop.tsx:147
↓ 37 callers
Method
moveAfter
* Moves one or more items after a given key. * * @param key - The key of the item to move the items after. * @param keys - The keys of the it
packages/react-stately/src/data/useListData.ts:131
↓ 37 callers
Method
moveBefore
* Moves one or more items before a given key. * * @param key - The key of the item to move the items before. * @param keys - The keys of the
packages/react-stately/src/data/useListData.ts:123
↓ 37 callers
Method
open
Opens the menu.
packages/react-stately/src/select/useSelectState.ts:143
↓ 37 callers
Function
useButton
( props: AriaButtonOptions<ElementType>, ref: RefObject<any> )
packages/react-aria/src/button/useButton.ts:177
↓ 36 callers
Function
getActionArgs
(args: string[])
packages/@react-spectrum/s2/stories/utils.tsx:81
↓ 36 callers
Method
setFocusedKey
* Sets the focused key, and optionally, whether the first or last child of that key should * receive focus.
packages/react-stately/src/selection/types.ts:39
↓ 36 callers
Function
useSlottedContext
( context: Context<SlottedContextValue<T>>, slot?: string | null )
packages/react-aria-components/src/utils.tsx:291
↓ 35 callers
Function
mergeStyles
(...styles: (StyleString | null | undefined)[])
packages/@react-spectrum/s2/style/runtime.ts:53
↓ 35 callers
Function
renderHook
(render, options)
packages/dev/test-utils/src/renderOverride.tsx:40
↓ 35 callers
Method
setFocused
Sets whether the collection is focused.
packages/react-stately/src/selection/types.ts:30
↓ 35 callers
Function
setValue
(value: Key | Key[] | null)
packages/react-stately/src/select/useSelectState.ts:180
↓ 35 callers
Function
useFilter
(options?: Intl.CollatorOptions)
packages/react-aria/src/i18n/useFilter.ts:30
↓ 34 callers
Method
hasAttribute
()
packages/react-aria/src/collections/Document.ts:418
↓ 34 callers
Method
isDropTarget
Returns whether the given target is equivalent to the current drop target.
packages/react-stately/src/dnd/useDroppableCollectionState.ts:58
↓ 34 callers
Function
render
(props = {})
packages/@adobe/react-spectrum/stories/datepicker/DateField.stories.tsx:291
↓ 33 callers
Function
getChildNodes
( node: Node<T>, collection: Collection<Node<T>> )
packages/react-stately/src/collections/getChildNodes.ts:15
↓ 33 callers
Function
getOwnerDocument
(el: Element | null | undefined)
packages/react-aria/src/utils/domHelpers.ts:1
↓ 32 callers
Method
appendChild
(child: ElementNode<T>)
packages/react-aria/src/collections/Document.ts:126
↓ 32 callers
Function
composeTailwindRenderProps
( className: string | ((v: T) => string) | undefined, tw: string )
starters/tailwind/src/utils.ts:15
↓ 32 callers
Function
useVisuallyHidden
(props: VisuallyHiddenProps = {})
packages/react-aria/src/visually-hidden/VisuallyHidden.tsx:61
↓ 31 callers
Function
installPointerEvent
()
packages/@react-aria/test-utils/src/testSetup.ts:74
↓ 31 callers
Function
render
(ui: ReactElement, options: S2RenderOptions = {})
packages/@react-spectrum/s2/test/utils/render.tsx:29
↓ 31 callers
Function
useProvider
()
packages/@adobe/react-spectrum/src/provider/Provider.tsx:210
↓ 30 callers
Method
getFirstKey
Get the first key in the collection.
packages/@react-types/shared/src/collections.d.ts:183
↓ 30 callers
Function
render
(props: any = {})
packages/@adobe/react-spectrum/stories/progress/ProgressBar.stories.tsx:283
↓ 29 callers
Function
useDragAndDrop
(options: DragAndDropOptions<T>)
packages/@adobe/react-spectrum/src/dnd/useDragAndDrop.ts:125
↓ 29 callers
Function
useSlotProps
(props: T & {id?: string}, defaultSlot?: string)
packages/@adobe/react-spectrum/src/utils/Slots.tsx:22
↓ 28 callers
Method
at
Get an item by the index of its key.
packages/@react-types/shared/src/collections.d.ts:174
↓ 28 callers
Function
useResizeObserver
( options: useResizeObserverOptionsType<T> )
packages/react-aria/src/utils/useResizeObserver.ts:15
next →
1–100 of 8,778, ranked by callers