Skip to main content

Box Shadow

Box-shadow x/y/blur/spread/color/unit/inset.

Helperpu_box_shadow()
Typebox_shadow
Stored valuestructured array

Example​

pu_box_shadow('card_shadow', ['label' => 'Card shadow']);

Stored value​

Pressundo stores this field as structured array. Composite fields keep structured arrays rather than opaque CSS strings, so your application can reuse individual values.

Storage example​

[
'x' => 0, 'y' => 12, 'blur' => 30, 'spread' => 0,
'color' => '#000000', 'unit' => 'px', 'inset' => false,
]

Important arguments​

Common field arguments: label, description, default, required, show_if, hide_if.

All normal fields can also use conditional visibility:

'show_if' => ['enabled' => true],

Behavior​

  • The same schema renders in Air, Slate and Compact.
  • Sanitization runs before validation/storage.
  • Hidden conditional fields keep their stored value unless your application explicitly changes it.
  • Output escaping remains contextual and should be applied where the value is rendered on the front end.

Notes​

The field is sanitized and validated through the central field-value processor before normal admin saves.

Reading the value​

$options = pu_options('theme_settings');
$value = $options->get('example_value', null);

Use the actual field ID from your schema instead of example_value.