﻿# design.md {#design-language}

## Design language {#geometry}

Chalk and OEM are component themes. Light/dark appearance is independent. Coordinate language through NfConfigProvider and Element Plus.

<span id="themes"></span>

| Theme | Primary | Source |
| --- | --- | --- |
| Chalk | #1177ff | nf-theme-chalk/src/_tokens.scss |
| OEM | #007555 | nf-theme-oem/src/_tokens.scss |

The theme --el-component-size variable currently sets default single-line controls to 28px. Components such as NfButton retain their documented size contracts.

Align labels and controls; keep 16px between an example’s result area and component. Compose existing table, search, column settings and drawer components.

Preserve keyboard focus, disabled, error, empty and loading states in overlays. Use public styling hooks rather than internal DOM.

## Element Plus Design Token {#element-plus-tokens}

Tokens come from the locked Element Plus light/dark CSS, preserving names, selectors, raw values and source version, with an upstream SCSS link. `var()` remains unresolved. Common UI Chalk/OEM overrides and additions are listed separately; Nf components are not aliases of similarly named El components.

```sh
common-ui token ElButton --format json
common-ui token NfButton --theme chalk --format json
```

## Tokens {#tokens}

```sh
common-ui theme --theme chalk
common-ui theme --theme oem
```

The command prints the theme variables as JSON in the terminal for developers or AI to query.

It includes:

- Theme variables and their raw values, such as primary colors and sizes.
- The variable source file, _tokens.scss.
- The knowledge version, Git commit and content digest.

This is a query command: it does not generate CSS files or modify the project theme.

With the CLI installed, run:

```txt
npx common-ui theme --theme chalk
```

## Typography {#typography-surfaces}

Inherit Element Plus font variables and preserve each component’s public sizes.

| Style | Configuration |
| --- | --- |
| Typography | `--el-font-family`, `--el-font-size-base`; NfButton mini/small use 12px and medium uses 14px. |
| Radius | `--el-border-radius-base`; NfButton mini uses 2px, the base radius is 4px; `round` and `circle` control rounded and circular buttons. |
| Shadow | `--el-box-shadow-light`; follows the active overlay component. |

## Functional colors, text and background {#surface-colors}

| Theme | Success | Text | Background |
| --- | --- | --- | --- |
| Chalk | #67c23a | #303133 | #ffffff |
| OEM | #31a36b | #252238 | #f8f7fc |
