Depth

Depth creates light surfaces. data-dn-depth="1" is pure white, and each higher depth is slightly grayer.

Depth values

Depth 1
Depth 2
Depth 3
Depth 4
Depth 5
Depth 6
Depth 7
import { View } from "density-base-ui";

export default function DepthsExample() {
  return (
    <View align="stretch" gap="sm" padding={true}>
      <View depth="1">Depth 1</View>
      <View depth="2">Depth 2</View>
      <View depth="3">Depth 3</View>
      <View depth="4">Depth 4</View>
      <View depth="5">Depth 5</View>
      <View depth="6">Depth 6</View>
      <View depth="7">Depth 7</View>
    </View>
  );
}

Depth sets background and the default text color. Combine it with data-dn-border, data-dn-radius, and data-dn-shadow to build a complete surface treatment.