Composition / foldkit-builder

Layers

const · packages/builder/src/index.ts:49

const Layers: Bundle.Declared<
  Bundle.Bundle<
    'TreeNavigation',
    { readonly openByDefault: boolean },
    { readonly current: string | null; readonly toggled: readonly string[] },
    | { readonly _tag: 'Opened'; readonly id: string }
    | { readonly _tag: 'Closed'; readonly id: string }
    | { readonly _tag: 'Focused'; readonly id: string },
    never,
    never,
    never,
    void,
    {},
    {}
  >,
  'layers'
>

The layers panel's keyboard focus and which rows are open: a tree that starts open.

In the guides