root/CompositeRoot.tsx

base-ui · packages/react/src/internals/composite/root/CompositeRoot.tsx · typescript · MIT
ui

Manages state and keyboard navigation for composite UI elements like menus and grids.

// Source: https://github.com/mui/base-ui | License: MIT | Copyright 2019 Material-UI SAS
// Provided via justclaw.it.com; keep this notice with the code.
'use client';
import * as React from 'react';
import { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';
import { CompositeList } from '../list/CompositeList';
import type { CompositeMetadata } from '../list/CompositeList';
import { useCompositeRoot } from './useCompositeRoot';
import { CompositeRootContext } from './CompositeRootContext';
import { useRenderElement } from '../../useRenderElement';
import type { BaseUIComponentProps, BaseUIEvent } from '../../types';
import type { ModifierKey } from '../composite';
import type { CompositeGridNavigator } from './gridNavigation';
import { useDirection } from '../../direction-context/

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key