Skip to content
MyAppBuilder
StableGuide

Shadows

Shadows give cards, menus and dialogs a sense of depth. In MyAppBuilder you do not draw shadows by hand: one shadow intensity setting defines three shadow sizes (small, medium, large) that components pick from, and the elevated card style uses them.

Shadows give cards, menus and dialogs a sense of depth. In MyAppBuilder you do not draw shadows by hand: one shadow intensity setting defines three shadow sizes (small, medium, large) that components pick from, and the elevated card style uses them.

When to use

  • Make elevated cards and dialogs stand out from the page (Soft or Medium).
  • Create a flat, print-like look with no shadows at all (None).
  • Add drama to a marketing-style landing page (Strong).

Shadow intensity

Open Theme › Shape & spacing › Shadow intensity. The slider has four steps:

StepLabelEffect
0NoneNo shadows anywhere, even on elevated cards and menus
1Soft (default)Light, barely visible shadows
2MediumClearly visible, still subtle
3StrongPronounced depth

Each step defines a small, medium and large shadow. Which one a component uses depends on the component: dropdown menus use the medium shadow, dialogs the large one, elevated cards the medium one.

Example
None                 Soft                  Strong
+------------+       +------------+        +------------+
|   Card     |       |   Card     |        |   Card     |
+------------+       +------------+        +------------+
                       ` ` ` ` ` `          `````````````
                                             ```````````

Presets: Mono uses None, Sunset uses Medium, the others use Soft.

Cards and shadows

Shadows mostly show on elevated cards. Set Theme › Component styles › Cards to Elevated to see the intensity setting in action; Bordered cards use a border instead, and Flat cards have neither. See Component styles.

Per-component shadow

The inspector's Style tab has a Shadow field with none, sm, md, lg and xl. sm, md and lg follow the theme intensity; xl is a fixed, very large shadow for hero sections and floating panels. Leave the field on "default" to keep the component's normal behaviour.

Common mistakes

  • Choosing Strong with Elevated cards on a data-heavy page. Every card floats and the page looks busy. Use Soft, or switch cards to Bordered.
  • Setting intensity to None and expecting a per-component md shadow to show. With intensity 0 the theme shadows are empty; use xl, which is fixed, or raise the intensity.
  • Using shadows to separate sections. A Section component with a background color or the theme border is usually cleaner.

Advanced

Token: shadows.intensity (integer 0–3). CSS variables: --mab-shadow-sm, --mab-shadow-md, --mab-shadow-lg. Per-component style.shadow maps sm/md/lg to those variables and xl to a constant (0 30px 80px with 20 % alpha). State styles (Hover, Focus, Pressed, Disabled) can set a different shadow, so a card can lift on hover.

Related

Was this helpful?