Elevation

Shadow system that creates depth and hierarchy in Virtual Labs interfaces while maintaining focus on scientific content.

Beta

Elevation Principles

Subtle Depth

Shadows are subtle to avoid distracting from scientific data and measurements.

Functional Hierarchy

Elevation indicates interactivity and importance, not just visual appeal.

Context Aware

Shadow intensity adapts to the interface context and user focus areas.

Elevation Scale

shadow-none
shadow-none
Flat elements, data tables
shadow-sm
shadow-sm
Subtle cards, buttons
shadow
shadow
Standard cards, panels
shadow-md
shadow-md
Elevated cards, dropdowns
shadow-lg
shadow-lg
Modals, overlays
shadow-xl
shadow-xl
Floating panels
shadow-2xl
shadow-2xl
High-priority modals
shadow-inner
shadow-inner
Inset elements, inputs

Usage Guidelines

Lab Interface Elevation

Control Panels

Use medium elevation to distinguish from background

shadow-md for control panels

Data Displays

Minimal elevation to keep focus on data

shadow-sm for data cards

Interactive Elements

Elevation increases on hover/focus

shadow-lg for active elements
Semantic Mapping
Component-specific elevation recommendations
cardshadow-md
buttonshadow-sm
modalshadow-2xl
dropdownshadow-lg
tooltipshadow-lg
floatingshadow-xl

Interactive Examples

Hover Effects
Elevation changes on interaction
Hover for elevation change
shadow-sm → shadow-md
Interactive card
shadow-md → shadow-lg
Floating element
shadow-lg → shadow-xl
Layered Interface
Multiple elevation levels
Modal (shadow-2xl)
Card (shadow-md)
Button (shadow-sm)
Button (shadow-sm)

Implementation

Tailwind CSS Classes
Shadow utility classes for elevation
/* Static shadows */
shadow-none     /* No shadow */
shadow-sm       /* Small shadow */
shadow          /* Default shadow */
shadow-md       /* Medium shadow */
shadow-lg       /* Large shadow */
shadow-xl       /* Extra large shadow */
shadow-2xl      /* 2x large shadow */
shadow-inner    /* Inner shadow */

/* Hover effects */
hover:shadow-lg         /* Shadow on hover */
focus:shadow-lg         /* Shadow on focus */
transition-shadow       /* Smooth shadow transitions */

/* Responsive shadows */
md:shadow-lg           /* Large shadow on medium screens */
lg:shadow-xl           /* Extra large on large screens */
CSS Custom Properties
Custom shadow definitions
:root {
  /* Base shadow scale */
  --vl-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --vl-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --vl-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --vl-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --vl-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --vl-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Component-specific shadows */
  --vl-card-shadow: var(--vl-shadow-md);
  --vl-button-shadow: var(--vl-shadow-sm);
  --vl-modal-shadow: var(--vl-shadow-2xl);
  --vl-dropdown-shadow: var(--vl-shadow-lg);
}
Best Practices

Performance

Use CSS transitions for smooth shadow changes. Avoid animating complex shadows on low-end devices.

Accessibility

Don't rely solely on shadows to convey information. Ensure sufficient color contrast remains.

Scientific Context

Keep shadows subtle in data-heavy interfaces to maintain focus on scientific content.