Skip to main content

Shadow Tokens

Elevation shadows for creating depth in your UI.

Shadow Scale​

TokenElevationUsage
shadows.smLowSubtle elevation (cards, inputs)
shadows.mdMediumDefault elevation (dropdowns, popovers)
shadows.lgHighProminent elevation (modals, sheets)
shadows.xlVery highMaximum elevation (dialogs, overlays)
shadows['2xl']HighestDramatic elevation (hero cards)

Usage​

import { shadows } from '@scaffald/ui';

<Card style={shadows.md}>
Elevated card content
</Card>

// Or in StyleSheet
const styles = StyleSheet.create({
dropdown: {
...shadows.lg,
backgroundColor: 'white',
borderRadius: 8,
},
});

Platform Differences​

  • Web: Shadows use CSS box-shadow
  • iOS: Shadows use shadowColor, shadowOffset, shadowOpacity, shadowRadius
  • Android: Shadows use elevation

Scaffald UI handles platform differences automatically when you use the shadow tokens.

See Also​