# @splunk/themes

> Theme variables and mixins for the Splunk design language

Latest version **1.13.1** (published 2026-11-05) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @splunk/themes
pnpm add @splunk/themes
yarn add @splunk/themes
bun add @splunk/themes
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.13.1 |
| Published | 2026-11-05 |
| First published | 2019-10-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=14 |
| Dependencies | 4 |
| Unpacked size | 2.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Splunk Inc. |
| Maintainers | splunker, vtsvetkov-splunk, splunk_sui_publish |

## Links

- npm: https://www.npmjs.com/package/@splunk/themes
- Homepage: https://splunkui.splunk.com/Packages/themes
- npm.io page: https://npm.io/package/@splunk/themes

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^4.18.1
- [colorjs.io](https://npm.io/package/colorjs.io.md) ^0.6.1
- [color-blend](https://npm.io/package/color-blend.md) ^2.0.9
- [@splunk/ui-utils](https://npm.io/package/@splunk/ui-utils.md) ^1.15.0

## Recent versions

- 1.13.1 (latest) — 2026-11-05
- 0.25.0 (release-v4) — 2025-06-04
- 1.0.0-beta.5 (beta-v5) — 2025-05-07
- 1.13.0 — 2026-10-07
- 1.12.0 — 2026-09-02
- 1.11.0 — 2026-08-21
- 1.10.0 — 2026-08-06
- 1.9.0 — 2026-07-07
- 1.8.0 — 2026-06-02
- 1.7.2 — 2026-05-11
- 1.7.1 — 2026-05-07
- 1.7.0 — 2026-04-10
- 1.6.0 — 2026-03-05
- 1.5.0 — 2026-02-10
- 1.4.1 — 2025-12-03
- … 41 more at https://npm.io/package/@splunk/themes/versions

## README

# @splunk/themes

A collection of Splunk software theme variables and mixins. This package provides functions that can be useful in React, styled-components and other frameworks.
Themes consist of plain objects containing primitives such as strings and numbers. Functions are used for mixins.

## Install

Install the package:
```bash
yarn add @splunk/themes

-or-

npm install @splunk/themes

```
### Peer-dependency notes
 - `react@^18` and `styled-components@^5"` are required peer dependencies for all capabilities except `getTheme()`.

## React Usage
A theme context is created at the root of the application using `SplunkThemeProvider`.
Apply `pageBase()` in app-level global styles with `createGlobalStyle`. `pageBase()` resets the browser's default page spacing
and applies theme-aware colors, typography, and layout styling to `html` and `body`.

```js
import { createGlobalStyle } from 'styled-components';
import SplunkThemeProvider from '@splunk/themes/SplunkThemeProvider';
import { pageBase } from '@splunk/themes/mixins';

const GlobalStyles = createGlobalStyle`
    html,
    body {
        ${pageBase()}
    }
`

<SplunkThemeProvider family="prisma" density="compact" colorScheme="light">
     <GlobalStyles />
     ...
</SplunkThemeProvider>;
```

## Styled Components Usage

Components are themed using `pick()`, `variables`, `mixins`.

```js
import { pick, variables, mixins } from '@splunk/themes';
import styled from 'styled-components';

const Wrapper = styled.div`
    ${mixins.reset()};

    color: ${pick({
         enterprise: variables.textColor,
         prisma: variables.contentColorDefault
    })};
`;
```


## Generic Usage
Theme variables are also available outside of React and styled-components.

```js
import getTheme from '@splunk/themes/getTheme';

const baseTheme = getTheme({family: 'prisma', colorScheme: 'light', density: 'compact' });

console.log(baseTheme.family, baseTheme.focusColor);
```

---
_Source: https://npm.io/package/@splunk/themes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
