Skip to content
@socra/theme standard

Effects

Effects in the Socra UI system.

Renderer-agnostic contract

Semantic roles

These @socra/theme roles are the normative contract. Each platform maps them through its adapter without changing their meaning.

Spacing, Shape, And Access

Semantic spacing, shape, density, target-size, and focus relationships. Each platform translates them through native layout mechanics.

14 references
inlineGap
spacing
designTokens.spacing.role.inlineGapLive value: sm

Space between adjacent inline elements.

controlInset
spacing
designTokens.spacing.role.controlInsetLive value: sm

Internal padding for interactive controls.

contentGap
spacing
designTokens.spacing.role.contentGapLive value: md

Space between related content.

sectionGap
spacing
designTokens.spacing.role.sectionGapLive value: lg

Space separating content sections.

pageInset
spacing
designTokens.spacing.role.pageInsetLive value: xl

Space between a viewport edge and page content.

control
shape
designTokens.shape.role.controlLive value: md

The shape relationship for interactive controls.

container
shape
designTokens.shape.role.containerLive value: lg

The shape relationship for grouped content.

overlay
shape
designTokens.shape.role.overlayLive value: lg

The shape relationship for transient surfaces.

avatar
shape
designTokens.shape.role.avatarLive value: round

The shape relationship for identity marks.

Comfortable density
spacing
designTokens.density.comfortableLive value: spaceScale, controlScale

The default space and control scale relationship.

Compact density
spacing
designTokens.density.compactLive value: spaceScale, controlScale

The compact space and control scale relationship.

Minimum target
spacing
designTokens.accessibility.target.minimumLive value: 44

The minimum interactive target dimension.

Preferred target
spacing
designTokens.accessibility.target.preferredLive value: 48

The preferred interactive target dimension.

Focus indicator thickness
spacing
designTokens.accessibility.focus.minimumIndicatorThicknessLive value: 2

The minimum visible focus-indicator thickness.

State And Motion

Intent, emphasis, and opacity relationships for acknowledgements, transitions, reveals, and dismissals.

12 references
acknowledge motion
motion
designTokens.motion.intent.acknowledgeLive value: duration, curve

Immediate feedback that an action was received.

transition motion
motion
designTokens.motion.intent.transitionLive value: duration, curve

Movement between stable interface states.

reveal motion
motion
designTokens.motion.intent.revealLive value: duration, curve

The appearance of newly available content.

dismiss motion
motion
designTokens.motion.intent.dismissLive value: duration, curve

The removal of transient content.

disabled state
motion
designTokens.state.opacity.disabledLive value: 0.38

The shared disabled opacity relationship.

muted state
motion
designTokens.state.opacity.mutedLive value: 0.62

The shared muted opacity relationship.

hoverWash state
motion
designTokens.state.opacity.hoverWashLive value: 0.08

The shared hoverWash opacity relationship.

selectedWash state
motion
designTokens.state.opacity.selectedWashLive value: 0.12

The shared selectedWash opacity relationship.

focusWash state
motion
designTokens.state.opacity.focusWashLive value: 0.16

The shared focusWash opacity relationship.

rest emphasis
motion
designTokens.state.emphasis.restLive value: 1

The shared rest emphasis relationship.

hover emphasis
motion
designTokens.state.emphasis.hoverLive value: 0.94

The shared hover emphasis relationship.

active emphasis
motion
designTokens.state.emphasis.activeLive value: 0.86

The shared active emphasis relationship.

Elevation And Hierarchy

Semantic elevation roles and renderer-independent layer order. Depth expresses hierarchy, never decoration.

6 references
resting elevation
shadow
designTokens.elevation.role.restingLive value: none

Content at rest on its owning surface.

card elevation
shadow
designTokens.elevation.role.cardLive value: raised

Grouped content raised from a surface.

menu elevation
shadow
designTokens.elevation.role.menuLive value: overlay

Transient action or selection content.

dialog elevation
shadow
designTokens.elevation.role.dialogLive value: modal

Focused, blocking task content.

showcase elevation
shadow
designTokens.elevation.role.showcaseLive value: prominent

Prominent presentation content.

Hierarchy order
layer
designTokens.hierarchy.orderLive value: 6 entries

The renderer-independent ordering of content, navigation, overlays, dialogs, and critical feedback.

Platform implementation

Web adapter preview

This specimen resolves the same semantic roles through @socra/web-token. It is browser conformance evidence, not part of the cross-platform contract.

card