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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQAumujy5kXaOKurr6zgTP2krHrFVXi2kj8seRYrlvq2GssUjReh5MiVpQbLFQNy9HsmcasqpBNVsXytWTw0ZDjA=

Panel

import * as Panel from '@dxos/react-ui/Panel';

A panel is the shell of a pane: a header row, a body that takes the rest of the height, and a footer row. Layout explains how it scrolls.

import * as
import Button
Button
from '@dxos/react-ui/Button';
import * as
import Icon
Icon
from '@dxos/react-ui/Icon';
import * as
import Layout
Layout
from '@dxos/react-ui/Layout';
import * as
import Panel
Panel
from '@dxos/react-ui/Panel';
import * as
import ScrollArea
ScrollArea
from '@dxos/react-ui/ScrollArea';
import * as
import Toolbar
Toolbar
from '@dxos/react-ui/Toolbar';
import * as
import Typography
Typography
from '@dxos/react-ui/Typography';
export const
const ContactsPanel: () => React.JSX.Element
ContactsPanel
= () => (
<
import Panel
Panel
.
const Root: React.ForwardRefExoticComponent<Omit<Panel.RootProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Root

The plank host: fills its parent, sets data-size and a level for its subtree, and is the pane's query container, so its header, body and footer collapse at the same pane width.

Root
>
<
import Panel
Panel
.
const Header: React.ForwardRefExoticComponent<Omit<{
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Header

The top row on the bar aspect, which steps off whatever level hosts the panel; it sizes to its content, so it takes no space when empty and one block when it holds a Toolbar.Root.

Header
>
<
import Toolbar
Toolbar
.
const Root: React.ForwardRefExoticComponent<Omit<Toolbar.RootProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Root

role=toolbar with the roving focus that role promises (decision 9); items that overflow scroll along its axis in a thin ScrollArea whose bar shows on hover, the toolbar itself being the viewport.

Root
>
<
import Toolbar
Toolbar
.
const Text: React.ForwardRefExoticComponent<Omit<{
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Text

A run of text that takes the free space and truncates; not an item, so roving focus skips it.

Text
>Contacts</
import Toolbar
Toolbar
.
const Text: React.ForwardRefExoticComponent<Omit<{
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Text

A run of text that takes the free space and truncates; not an item, so roving focus skips it.

Text
>
<
import Toolbar
Toolbar
.
const Separator: React.ForwardRefExoticComponent<Omit<Toolbar.SeparatorProps, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Separator

A rule across the toolbar's axis (vertical in a horizontal toolbar), or with variant='gap' a growing spacer; not an item, so roving focus skips it.

Separator
variant?: "gap" | "line" | undefined

gap is an empty spacer that grows, pushing the items after it to the toolbar's end.

variant
='gap' />
<
import Button
Button
.
const Root: React.ForwardRefExoticComponent<Omit<Button.RootProps, "className"> & {
classNames?: ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLButtonElement>>
export Root
Root
icon?: string | undefined

Leading icon.

icon
='ph--plus--regular'
label?: string | undefined

Visible text; children take precedence.

Required: names the button (aria-label) and shows in a Tooltip.

label
='Add contact'
iconOnly?: boolean | undefined

A control-sized square inset in a block-sized cell (follow-up 19), showing only the icon.

iconOnly
/>
</
import Toolbar
Toolbar
.
const Root: React.ForwardRefExoticComponent<Omit<Toolbar.RootProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Root

role=toolbar with the roving focus that role promises (decision 9); items that overflow scroll along its axis in a thin ScrollArea whose bar shows on hover, the toolbar itself being the viewport.

Root
>
</
import Panel
Panel
.
const Header: React.ForwardRefExoticComponent<Omit<{
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Header

The top row on the bar aspect, which steps off whatever level hosts the panel; it sizes to its content, so it takes no space when empty and one block when it holds a Toolbar.Root.

Header
>
<
import Panel
Panel
.
const Body: React.ForwardRefExoticComponent<Omit<{
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Body

The growing middle row, a plain slot: it neither scrolls nor adds a gutter, so content composes its own frame (asChild onto a ScrollArea.Root around a Container, or a canvas that fills the row). The first Container under it takes the panel's gutter unless it names one. Like the header and footer it is no query container, so its content collapses against the panel.

Body
asChild?: boolean | undefined
asChild
>
<
import ScrollArea
ScrollArea
.
const Root: React.ForwardRefExoticComponent<Omit<ScrollArea.RootProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Root

Non-scrolling frame: hosts the overlay thumbs and is the query container for its content.

Root
>
<
import ScrollArea
ScrollArea
.
const Viewport: React.ForwardRefExoticComponent<Omit<ScrollArea.ViewportProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Viewport

The scrolling element; under asChild it is the child (e.g. a Container) itself.

Viewport
asChild?: boolean | undefined
asChild
>
<
import Layout
Layout
.
const Container: React.ForwardRefExoticComponent<Omit<Layout.ContainerProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>

Grid part (decision 5): every prop is a data-* attribute resolved by theme/container.css.

Container
gutter?: Layout.Gutter | undefined

inherit makes the container a subgrid of its parent's tracks; any other value starts a fresh template. Unset, it is the enclosing Panel.Body's gutter for the first Container under the Body, and inherit everywhere else.

gutter
='rail'>
{
const CONTACTS: string[]
CONTACTS
.
Array<string>.map<React.JSX.Element>(callbackfn: (value: string, index: number, array: string[]) => React.JSX.Element, thisArg?: any): React.JSX.Element[]

Calls a defined callback function on each element of an array, and returns an array that contains the results.

@param ― callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

@param ― thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

map
((
name: string
name
) => (
<
import Layout
Layout
.
const Container: React.ForwardRefExoticComponent<Omit<Layout.ContainerProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>

Grid part (decision 5): every prop is a data-* attribute resolved by theme/container.css.

Container
React.Attributes.key?: React.Key | null | undefined
key
={
name: string
name
}
layout?: "row" | "stack" | undefined

stack places each child across the content track; row flows children through its inner tracks.

layout
='row'>
<
import Layout
Layout
.
const Block: React.ForwardRefExoticComponent<Omit<Layout.BlockProps, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>

A block-sized square that centres its content (typically an Icon); compact drops the fixed height.

Block
rail?: "start" | "end" | undefined

Places the block in a parent Container's start or end gutter.

rail
='start'>
<
import Icon
Icon
.
const Icon: React.ForwardRefExoticComponent<Omit<Omit<React.SVGProps<SVGSVGElement>, "ref">, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & {
icon: string;
label?: string;
hue?: Icon.IconHue;
valence?: Icon.IconValence;
tone?: Icon.IconTone;
spin?: boolean;
size?: Size;
} & React.RefAttributes<SVGSVGElement>>
Icon
icon: string
icon
='ph--user--regular' />
</
import Layout
Layout
.
const Block: React.ForwardRefExoticComponent<Omit<Layout.BlockProps, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>

A block-sized square that centres its content (typically an Icon); compact drops the fixed height.

Block
>
<
import Typography
Typography
.
const Text: React.ForwardRefExoticComponent<Omit<Typography.TextProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLParagraphElement>>
export Text

Text whose first line is centred in a block, so it lines up with a Block or control beside it however many lines it wraps to. Renders a <p>; asChild puts the metrics on a heading or other text element instead.

Text
>{
name: string
name
}</
import Typography
Typography
.
const Text: React.ForwardRefExoticComponent<Omit<Typography.TextProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLParagraphElement>>
export Text

Text whose first line is centred in a block, so it lines up with a Block or control beside it however many lines it wraps to. Renders a <p>; asChild puts the metrics on a heading or other text element instead.

Text
>
</
import Layout
Layout
.
const Container: React.ForwardRefExoticComponent<Omit<Layout.ContainerProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>

Grid part (decision 5): every prop is a data-* attribute resolved by theme/container.css.

Container
>
))}
</
import Layout
Layout
.
const Container: React.ForwardRefExoticComponent<Omit<Layout.ContainerProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>

Grid part (decision 5): every prop is a data-* attribute resolved by theme/container.css.

Container
>
</
import ScrollArea
ScrollArea
.
const Viewport: React.ForwardRefExoticComponent<Omit<ScrollArea.ViewportProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Viewport

The scrolling element; under asChild it is the child (e.g. a Container) itself.

Viewport
>
</
import ScrollArea
ScrollArea
.
const Root: React.ForwardRefExoticComponent<Omit<ScrollArea.RootProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Root

Non-scrolling frame: hosts the overlay thumbs and is the query container for its content.

Root
>
</
import Panel
Panel
.
const Body: React.ForwardRefExoticComponent<Omit<{
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Body

The growing middle row, a plain slot: it neither scrolls nor adds a gutter, so content composes its own frame (asChild onto a ScrollArea.Root around a Container, or a canvas that fills the row). The first Container under it takes the panel's gutter unless it names one. Like the header and footer it is no query container, so its content collapses against the panel.

Body
>
<
import Panel
Panel
.
const Footer: React.ForwardRefExoticComponent<Omit<{
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Footer

The bottom row on the bar aspect; like Header it sizes to its content, holding a Toolbar.Root when it needs one.

Footer
>
<
import Toolbar
Toolbar
.
const Root: React.ForwardRefExoticComponent<Omit<Toolbar.RootProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Root

role=toolbar with the roving focus that role promises (decision 9); items that overflow scroll along its axis in a thin ScrollArea whose bar shows on hover, the toolbar itself being the viewport.

Root
>
<
import Toolbar
Toolbar
.
const Text: React.ForwardRefExoticComponent<Omit<{
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Text

A run of text that takes the free space and truncates; not an item, so roving focus skips it.

Text
>{
const CONTACTS: string[]
CONTACTS
.
Array<string>.length: number

Gets or sets the length of the array. This is a number one higher than the highest index in the array.

length
} contacts</
import Toolbar
Toolbar
.
const Text: React.ForwardRefExoticComponent<Omit<{
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Text

A run of text that takes the free space and truncates; not an item, so roving focus skips it.

Text
>
</
import Toolbar
Toolbar
.
const Root: React.ForwardRefExoticComponent<Omit<Toolbar.RootProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Root

role=toolbar with the roving focus that role promises (decision 9); items that overflow scroll along its axis in a thin ScrollArea whose bar shows on hover, the toolbar itself being the viewport.

Root
>
</
import Panel
Panel
.
const Footer: React.ForwardRefExoticComponent<Omit<{
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Footer

The bottom row on the bar aspect; like Header it sizes to its content, holding a Toolbar.Root when it needs one.

Footer
>
</
import Panel
Panel
.
const Root: React.ForwardRefExoticComponent<Omit<Panel.RootProps & {
asChild?: boolean;
}, "className"> & {
classNames?: import("@dxos/ui-types").ClassNameValue;
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>
export Root

The plank host: fills its parent, sets data-size and a level for its subtree, and is the pane's query container, so its header, body and footer collapse at the same pane width.

Root
>
);
Part What it is
Panel.Root The shell. It fills its parent and sets the size and surface for everything in it
Panel.Header A row sized to its content, usually a toolbar
Panel.Body The area that takes the remaining height. Use asChild to put it on a ScrollArea.Root
Panel.Footer A row sized to its content, such as a status line

Panel.Root takes these props:

Prop Type Effect
size Size Sets the size of everything in the panel
level 'sunken' | 'chrome' | 'base' | 'raised' | 'overlay' | 'popup' Sets the surface. 'base' by default
width 'document' Keeps the body’s content at reading width, centered, while it still scrolls at the panel’s edge
gutter 'rail' | 'inset' | 'sm' | 'md' | 'lg' | 'none' Sets the gutter of the first container in the body. 'sm' by default

The panel is a container query, so its header, body and footer can change layout together at a narrow width.