Panel as a quiet backdrop for one coherent informational region, such as a block of copy, a summary, or a related set of facts. It builds on Container but is non-focusable, non-pressable, and non-clickable by default. Panel owns a fixed content scale, the panel material, and a medium corner radius so informational surfaces remain visually consistent.large spacing token to inset authored content that is not full bleed.import {Panel, TextView, TextStyle, TextColor} from '@wearables-ui-toolkit/mrbd';
function ConnectionSummary() {
return (
<Panel>
<div className="panel-content">
<TextView textStyle={TextStyle.BODY1}>Connection details</TextView>
<TextView textStyle={TextStyle.META1} textColor={TextColor.SECONDARY}>
UPDATED NOW
</TextView>
</div>
</Panel>
);
}
.panel-content {
display: grid;
gap: var(--uit-spacing-med-lg);
padding: var(--uit-spacing-large);
}
import {Panel, TextView, TextStyle} from '@wearables-ui-toolkit/mrbd';
<Panel
focusable
pressable
clickable
ariaLabel="Open connection details"
onActivate={openConnectionDetails}
>
<div className="panel-content">
<TextView textStyle={TextStyle.BODY1}>Connection details</TextView>
</div>
</Panel>;
Panel accepts every Container prop except contentScaleForStateFn, which the component owns, and interactive, which it replaces with separate capability switches. It renders a div and forwards its ref to that element. See Container and InteractableBase for the complete inherited API. The props that differ or most directly affect a panel appear below. The complete prop type is PanelProps.| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Content displayed in the panel. |
| Prop | Type | Default | Description |
|---|---|---|---|
material | ContainerMaterial | the panel material | Replaces the backdrop material. |
shapeProvider | ShapeProvider | rounded rectangle at the medium corner radius | Defines the geometry for content clipping and material paths. |
focusable | boolean | false | Lets the entire panel receive focus when true. |
pressable | boolean | false | Adds press feedback to the entire panel when true. |
clickable | boolean | false | Makes the entire panel one action when true. |
width | number \| string | 'auto' | CSS width. |
height | number \| string | 'auto' | CSS height. |
clipContent | boolean | true | Clips the content subtree to the shape. |
disabled | boolean | false | Blocks activation and applies disabled opacity. Use it only on an interactive panel. Only an interactive panel sets aria-disabled, and only there does a change after mount take effect. |
onActivate | (event: InteractableActivationEvent) => void | — | Handles the action when the panel is clickable. |
onStateChange | (prev: InteractionState, next: InteractionState) => void | — | Reports interaction-state transitions when the panel is interactive. |
ariaLabel | string | — | Accessible name. Required when the panel is clickable. |
visualStateOverride | VisualState | — | Overrides the rendered visual state. |
style | CSSProperties | — | Styles merged over the panel’s own styles. |
interactive prop is not available. Set focusable, pressable, and clickable individually. Any one of these props makes the panel an interactable; leaving all three unset keeps it a plain backdrop.aria-disabled, press handling, or activation. It retains the default arrow cursor, and onStateChange does not fire. The panel is a surface, not a control.Panel pins the content scale, so content does not inset and expand across states as it does in Container. Instead, the material owns feedback through per-state opacity: quiet at rest, brighter on focus, and brighter again on press.material replaces the entire material, including that gradient.Container, including partial-focus handoff and the rubber band at a directional dead end.Container, the panel is an inline flex box that follows its content unless width or height specifies another size. Prefer responsive layout to fixed panel dimensions.customScaleX / customScaleY / customAlpha unchanged from Container.TextView hierarchy to expose that structure to assistive technology.InteractableBase semantics. A clickable panel gives the div root a button role, a focusable panel gets a tab index, and the component provides aria-disabled and Enter/Space activation. A clickable panel requires an ariaLabel that describes what activation does. If the panel is not a button, the application must provide the appropriate role and matching ARIA state props so its semantics remain accurate.clickable but not focusable exposes a button role without a tab stop, so keyboard users cannot reach it. Whenever the panel represents an action, set focusable, pressable, and clickable together to provide focus, feedback, and activation consistently.TextView hierarchy inside it.var(--uit-spacing-large) to inset authored content.focusable, pressable, and clickable together so keyboard focus, press feedback, and activation remain consistent.VerticalList with ListItem.Container.Container, StaticContainer, Surface, Button, Chip, Tag, or Header in a panel; this composition is unsupported.Tag, or a Chip instead of a panel.