# @nokkel/components

> Nokkel component library for React-based applications

Latest version **3.5.69** (published 2025-10-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nokkel/components
pnpm add @nokkel/components
yarn add @nokkel/components
bun add @nokkel/components
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.5.69 |
| Published | 2025-10-01 |
| First published | 2024-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 11 |
| Unpacked size | 1.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nokkel Technologies Ltd |
| Maintainers | macru, curtishuangnokkel, chrisddonaldson_nokkel, cshaw, chiara-nokkel, nokkel-developer |
| Keywords | lib, nokkel, typescript |

## Links

- npm: https://www.npmjs.com/package/@nokkel/components
- Repository: https://github.com/nokkel-developer/react-components
- Homepage: https://github.com/nokkel-developer/react-components#readme
- Issues: https://github.com/nokkel-developer/react-components/issues
- npm.io page: https://npm.io/package/@nokkel/components

## Dependencies (11)

- [dayjs](https://npm.io/package/dayjs.md) ^1.11.13
- [luxon](https://npm.io/package/luxon.md) ^3.6.1
- [animejs](https://npm.io/package/animejs.md) ^4.0.0
- [recharts](https://npm.io/package/recharts.md) ^3.0.2
- [usehooks-ts](https://npm.io/package/usehooks-ts.md) ^3.1.0
- [react-cookie](https://npm.io/package/react-cookie.md) ^7.2.0
- [@emotion/react](https://npm.io/package/@emotion/react.md) ^11.13.3
- [@emotion/styled](https://npm.io/package/@emotion/styled.md) ^11.13.0
- [@types/js-cookie](https://npm.io/package/@types/js-cookie.md) ^3.0.6
- [react-number-format](https://npm.io/package/react-number-format.md) ^5.3.4
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^5.2.6

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 3.5.69 (latest) — 2025-10-01
- 3.5.68 — 2025-10-01
- 3.5.67 — 2025-09-30
- 3.5.66 — 2025-09-29
- 3.5.62 — 2025-09-19
- 3.5.61 — 2025-09-18
- 3.5.59 — 2025-09-18
- 3.5.58 — 2025-09-05
- 3.5.56 — 2025-08-19
- 3.5.55 — 2025-08-15
- 3.5.54 — 2025-08-12
- 3.5.53 — 2025-08-04
- 3.5.52 — 2025-07-31
- 3.5.51 — 2025-07-29
- 3.5.50 — 2025-07-25
- … 244 more at https://npm.io/package/@nokkel/components/versions

## README

## React Components

A repository for re-usable, React-based components for use across web applications within the Nokkel ecosystem.

## Pre-requisites

- [asdf](https://asdf-vm.com/guide/getting-started.html)

## Integration

To use this component library in your application, you need to set up i18next for internationalization support and react-router-dom for navigation components.

### Installing i18next

```bash
npm install i18next react-i18next
```

### Setting up i18next

Create an `i18n.ts` file in your project:

```typescript
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import { getResources } from '@nokkel/react-components';

const resources = getResources();

i18n.use(initReactI18next).init({
  debug: false,
  lng: 'en',
  fallbackLng: 'en',
  interpolation: {
    escapeValue: false,
  },
  resources,
});

export default i18n;
```

### Installing react-router-dom (Required for navigation components)

Some components use `react-router-dom`'s Link component for navigation. Install it as a dependency:

```bash
npm install react-router-dom
```

**Important**: Components that use routing require your application to be wrapped in a Router provider (BrowserRouter, HashRouter, etc.).

### Setting up react-router-dom

Wrap your application with a Router provider. Choose the appropriate router for your use case:

```tsx
import React from 'react';
import { BrowserRouter } from 'react-router-dom';

function App() {
  return <BrowserRouter>{/* Your app content */}</BrowserRouter>;
}

export default App;
```

## Contributing

To create a component directory, run `npm run create:component --name="INSERT NAME HERE"

To create an icon, run `npm run create:icon --name="INSERT NAME HERE"

Nokkel components are structured like so:

```
src/
├── components/
│   └── [Component]/
│       ├── [Component].css
│       ├── [Component].stories.tsx
│       ├── [Component].tsx
│       ├── index.ts
│       └── types.ts
├── content/
│   └── [namespace]/
│       ├── index.json
│       └── [provider].json
├── context/
│   ├── [context].tsx
│   └── index.ts
├── hooks/
│   ├── [hook].ts
│   └── index.ts
├── icons/
│   ├── [Icon]
|   ├── [Icon].stories.tsx
│   └── index.ts
├── styles/
│   └── global.css
├── sections/
│   └── [Section]/
│       ├── [Section].css
│       ├── [Section].stories.tsx
│       ├── [Section].tsx
│       ├── index.ts
│       └── types.ts
├── utils/
│   ├── [Util].ts
│   └── index.ts
└── index.ts
```

- `Component.css` is where the component classes are stored. We use tailwind styles with the @apply for styles.
  - For brands, use the `[data-theme="[brand]"]` selector in order to change that specific class for brands.
  - See Button.css for a good example.
- `Component.stories.tsx` is where the story for Storybook is stored.
  - Decorators may be used for containers in the case of responsive components.
  - Note: Storybook documentation oftentimes has a type issue with the `satisfies Meta<typeof [Component]>`. It's suggested to use the same pattern in Button.stories.tsx
  - The first story is used as the top example in Autodocs so it's best to ensure it has all the needed controls (though this can be manually added).
- `Component.tsx` contains the actual component.
  - Using a Multi-line comment before the main export will be used by Autodocs in Storybook.
  - Add a `data-testid=[component]` for testing purposes and identification of component.
  - MaterialUI is used as a base for many components.
  - Button.tsx is a model component.
- `types.ts` contains all the types such as props.
  - Comments before each props will be documented in storybook to help design know the fields that can be edited.
- `index.ts` exports the component and types. We use this to export the component to the parent folder.
- `[namespace]/index.json` is the translation file for the text content using i18next formatting.
- `[namespace]/[provider].json` is the provider-specific variant translation file that overrides the default translations.

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