Skip to main content

SelectionPanel

Gate a fixed panel's visibility with a native selection group.

Import​

import { SelectionPanel } from '@bedrock-core/ui';

Usage​

<SelectionPanel group={'library_pages'} index={1}>
<Text>{'Second page'}</Text>
</SelectionPanel>

The panel must share its group with native selector inputs. The component provides visibility; a navigation library owns the associated actions and history.

Props​

PropTypeDefaultDescription
group*string—Shared native selection group using letters, digits, underscores or hyphens
indexnumber—One compiled selection index
indexesreadonly number[]—Several compiled indexes that can reveal this panel
activeIndexesreadonly number[]Declared indexesRestrict membership using server-carried data
childrenJSX.Node—Content retained beneath the panel

Inherits control props. Supply either index or indexes, using nonnegative integers. Their universe is fixed during compilation; activeIndexes can change membership within that universe.

Notes​

The panel keeps its content mounted while native selection changes visibility. It does not rerun JavaScript when selected. Preserve the compiled layout box when composing several panels over the same area.

Ordinary application navigation uses static navigators instead of managing these groups directly.