Skip to content

components/Surface

import { … } from 'zidane-ui'ui/src/components/Surface.tsx

Tray > Raised (the depth ladder)
A raised card in a tray
Raised live
Lifted one step while a run streams
track chip, well, fill
12.4k · $0.08
SectionLabel, Meta
3 files · 18ms
EmptyState
No sessions yet
Start one to see it here.
PanelEmpty, warn, loading
Nothing changed
Edits the agent makes show here.
Could not read the folder
Permission denied.

Components#

CodePanelComponent#

Renders monospace output or input in a pre, set into its surface.

TypeScript
function CodePanel(props: CodePanelProps): Element
Parameters
NameTypeDescription
propsCodePanelProps

Component props.

Element
CodePanel props
NameTypeDefaultDescription
childrenReactNode

The text to show.

className?string

Extra classes on the pre.

maxHeight?string | number

Maximum height of the panel, as a CSS length or a number of pixels. The panel scrolls past it.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

wrap?booleantrue

Wrap long lines. When off, the panel scrolls horizontally instead.

ui/src/components/Surface.tsx:80

EmptyStateComponent#

Renders the one empty or placeholder block: an optional icon, a title, a hint and an action, centred, usually in a tray.

TypeScript
function EmptyState(props: EmptyStateProps): Element
Parameters
NameTypeDescription
propsEmptyStateProps

Component props.

Element
EmptyState props
NameTypeDescription
action?ReactNode

Control under the hint, such as a button.

className?string

Extra classes on the wrapping element.

compact?boolean

Less vertical room, for a panel tab.

framed?boolean

Set in a tray. Off inside a surface that is already tray-toned (the side panel): no tray on a tray.

hint?ReactNode

Secondary text under the title.

icon?string

Icon class shown above the title.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

titleReactNode

Main message.

titleAs?'div' | 'h1' | 'h2' | 'h3'

The title's element: a heading where the empty state is the page (a 404).

ui/src/components/Surface.tsx:121

MetaComponent#

The technical voice: mono, tabular, small, muted.

TypeScript
function Meta(props: MetaProps): Element
Parameters
NameTypeDescription
propsMetaProps

Component props.

Element
Meta props
NameTypeDescription
childrenReactNode

The value to show.

className?string

Extra classes on the text.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

title?string

Native tooltip.

ui/src/components/Surface.tsx:185

RaisedComponent#

Renders a card or control lifted off its tray, with a border and the raised shadow. Accepts the attributes of a div.

TypeScript
function Raised(props: RaisedProps): Element
Parameters
NameTypeDescription
propsRaisedProps

A radius, live and the attributes of a div.

Element
Raised props
NameTypeDefaultDescription
live?boolean

Lift the card one step with the live shadow, for something that is active right now.

radius?from TrayPropsRadius'lg'

Corner radius: sm, md, lg or xl.

ui/src/components/Surface.tsx:50

SectionLabelComponent#

Uppercase label for a section of a panel, menu or form.

TypeScript
function SectionLabel(props: SectionLabelProps): Element
Parameters
NameTypeDescription
propsSectionLabelProps

Component props.

Element
SectionLabel props
NameTypeDescription
childrenReactNode

The label text.

className?string

Extra classes on the label.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/components/Surface.tsx:160

TrayComponent#

Renders the bed of the surface ladder: sections, wells for grouped rows, code and quiet cards. Accepts the attributes of a div.

TypeScript
function Tray(props: TrayProps): Element
Parameters
NameTypeDescription
propsTrayProps

A radius and the attributes of a div.

Element
Tray props
NameTypeDefaultDescription
radius?Radius'lg'

Corner radius: sm, md, lg or xl.

ui/src/components/Surface.tsx:34

Interfaces#

CodePanelPropsInterface#

Props for CodePanel.

TypeScript
interface CodePanelProps
CodePanelProps properties
NameTypeDefaultDescription
childrenReactNode

The text to show.

className?string

Extra classes on the pre.

maxHeight?string | number

Maximum height of the panel, as a CSS length or a number of pixels. The panel scrolls past it.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

wrap?booleantrue

Wrap long lines. When off, the panel scrolls horizontally instead.

ui/src/components/Surface.tsx:57

EmptyStatePropsInterface#

Props for EmptyState.

TypeScript
interface EmptyStateProps
EmptyStateProps properties
NameTypeDescription
action?ReactNode

Control under the hint, such as a button.

className?string

Extra classes on the wrapping element.

compact?boolean

Less vertical room, for a panel tab.

framed?boolean

Set in a tray. Off inside a surface that is already tray-toned (the side panel): no tray on a tray.

hint?ReactNode

Secondary text under the title.

icon?string

Icon class shown above the title.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

titleReactNode

Main message.

titleAs?'div' | 'h1' | 'h2' | 'h3'

The title's element: a heading where the empty state is the page (a 404).

ui/src/components/Surface.tsx:94

MetaPropsInterface#

Props for Meta.

TypeScript
interface MetaProps
MetaProps properties
NameTypeDescription
childrenReactNode

The value to show.

className?string

Extra classes on the text.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

title?string

Native tooltip.

ui/src/components/Surface.tsx:169

RaisedPropsInterface#

Props for Raised: TrayProps plus live.

TypeScript
interface RaisedProps extends TrayProps
RaisedProps properties
NameTypeDefaultDescription
live?boolean

Lift the card one step with the live shadow, for something that is active right now.

radius?from TrayPropsRadius'lg'

Corner radius: sm, md, lg or xl.

ui/src/components/Surface.tsx:39

SectionLabelPropsInterface#

Props for SectionLabel.

TypeScript
interface SectionLabelProps
SectionLabelProps properties
NameTypeDescription
childrenReactNode

The label text.

className?string

Extra classes on the label.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/components/Surface.tsx:146

TrayPropsInterface#

Props for Tray: a radius and the attributes of a div.

TypeScript
interface TrayProps extends HTMLAttributes<HTMLDivElement>
TrayProps properties
NameTypeDefaultDescription
radius?Radius'lg'

Corner radius: sm, md, lg or xl.

ui/src/components/Surface.tsx:20