Skip to content
TeaCSS documentation

Surface shortcuts

Compose neutral surfaces with borders, radii, and elevation.

Surface commons provide six surface treatments. They combine Standard neutral colors with borders, radii, and elevation. Layout, padding, text color, and interaction behavior remain with the application.

Class Treatment
surface-panel Neutral 100, a 1px neutral 500 border, and rd:4x
surface-sunken Neutral 150 with a transparent 1px border
surface-tooltip Neutral 100, rd:2x, and shadow:2x; a visible border in dark appearance
surface-menu Neutral 100, a neutral 500 border, rd:4x, and shadow:4x
surface-dialog Neutral 100, rd:4x, and shadow:5x; a visible border in dark appearance
surface-fullscreen Neutral 100, rd:6x, and shadow:6x; a visible border in dark appearance
html
<section class="surface-panel p:4 text-color:neutral-950" aria-labelledby="surface-title">
  <h2 id="surface-title" class="heading-4x">Project settings</h2>
  <p class="prose-2x">A shared surface with application-owned layout.</p>
</section>

Use Card when its header, body, and footer arrangement fits the content. A surface does not create a working popover or dialog. The owner still supplies positioning, visibility, keyboard behavior, and focus management.

Select role palettes centrally on html with data-css-neutral and the other Standard role attributes. Check borders and focus in light, dark, and forced colors. A shadow alone cannot establish a forced-colors boundary.

Storybook specimen · Next: Transition