# injectIsDarkTheme Type documentation

## TypeScript declaration

### [injectIsDarkTheme](<https://github.com/siemens/element/blob/main/projects/element-ng/theme/si-theme-signals.ts#L20-L32>)

**Kind:** constant

```
import { injectIsDarkTheme } from '@siemens/element-ng/theme';
```

Returns a signal that reflects whether the current Element theme is dark (`true`) or light (`false`). The signal reacts to `theme-switch` events dispatched on `window`.

Returns: A boolean signal — `true` when the active theme is dark

Throws: When called outside of an Angular injection context

```
() => Signal<boolean> = ...
```

```
injectIsDarkTheme(): Signal<boolean>
```

Returns a signal that reflects whether the current Element theme is dark (`true`) or light (`false`). The signal reacts to `theme-switch` events dispatched on `window`.

Returns: A boolean signal — `true` when the active theme is dark

Throws: When called outside of an Angular injection context

**Returns:** [Signal](<https://angular.dev/api/core/Signal>)`<`[boolean](<https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean>)`>`
