
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A scalable and efficient TypeScript React component library for modern applications.
To start using oakd, install it via npm:
npm install oakd
Then, import the styles in your App.tsx (or wherever you use oakd components):
import 'oakd/build/index.css';
After installation, use components like:
import React from "react";
import 'oakd/build/index.css';
import { Title, Paragraph } from "oakd";
const App = () => (
<div className="app-container">
<Title>Hello from oakd</Title>
<Paragraph>Some content</Paragraph>
</div>
);
export default App;
The oakd icon pack is custom-designed for OakFrame. All SVG icons are stored in the src/Icon/asset/ folder. Follow these steps to update or add icons:
Add or update SVG files:
Place your SVG files in the src/Icon/asset/ directory. File names should follow this pattern:
oakd_Icon[A-Z][a-z+].svg
Run the icon generation script:
Use the following command to generate the icon exports:
npm run icons
This script creates a file named src/Icon/Icons.bin.tsx, which includes:
iconMap object mapping icon names to components (e.g., { Angle: IAngle, Trash: ITrash }).IconTrash, IconUser, etc.).Icons are automatically included:
Once the script runs, all icons are ready to use with proper paths and inlined assets.
Run all tests using Jest:
npm run test
Jest is configured to:
ts-jest for TypeScript support.node_modules/.coverage/ directory.Compile the library for production:
npm run build
Rollup is configured to:
build/index.js) and ES modules (build/index.esm.js).index.css to build/ automatically.@rollup/plugin-image.Start a live-reloading Storybook instance:
npm run storybook
Export Storybook as static files:
npm run storybook:export
Serve the generated storybook-static/ folder.
Easily scaffold a new component using:
npm run generate YourComponentName
This generates:
/src/YourComponentName
├── YourComponentName.tsx
├── YourComponentName.mdx
├── YourComponentName.stories.tsx
├── YourComponentName.test.tsx
├── YourComponentName.types.ts
├── YourComponentName.css
Modify templates under util/templates as needed.
Don’t forget to export your new component in index.ts!
The project uses ESLint with a configuration that:
*.bin.tsx) from coverage.npm run lint
If you want to run the ESLint with fix:
npm run lint:fix
To test oakd in another project (test-app) without publishing, run:
npm i --save ../oakd
This adds an entry in package.json:
"dependencies": {
"oakd": "file:../oakd"
}
If you see:
Invalid hook call. Hooks can only be called inside the body of a function component.
This likely means multiple versions of React are installed.
Fix it by linking React from the consuming app:
npm link ../test-app/node_modules/react
Alternatively, configure Webpack as suggested here.
Ensure you're logged in:
npm login
Update package.json with your NPM package name, then publish:
npm publish
The "prepublishOnly": "npm run build" script ensures a fresh build before publishing.
Alternatively, push the built package to GitHub and install it via:
npm i --save git+https://github.com/arkamedus/oakd.git#branch-name
or
npm i --save github:arkamedus/oakd#branch-name
Include the library’s styles in your project:
import 'oakd/build/index.css';
Utilize predefined CSS variables from variables.css:
.example-container {
color: var(--oakd-white);
background-color: var(--oakd-black);
}
More on CSS Variables.
Automatically adapts to dark mode using:
@media (prefers-color-scheme: dark) { ... }
Customization options are in src/index.css.
Supports Sass, Less, Stylus via:
yarn add node-sass --dev # Sass
yarn add stylus --dev # Stylus
yarn add less --dev # Less
For CSS Modules, update rollup-config.js:
postcss({
modules: true
})
See this branch for implementation.
Load components on demand:
import TestComponent from 'oakd/build/TestComponent';
For setup, refer to this commit.
Image imports now work automatically without additional configuration. You can use:
import logo from "./logo.png";
export const ImageComponent = () => <img src={logo} />;
Install JSON plugin:
npm i -D @rollup/plugin-json
Add it to rollup-config.js:
plugins: [json(), ...]
Now you can import JSON files:
import data from "./some-data.json";
export const JsonDataComponent = () => <div>{data.description}</div>;
We welcome contributions! Open an issue or submit a PR to improve oakd.
For detailed contribution guidelines, refer to our Contributing Guide.
Have questions or ideas? Feel free to reach out on GitHub Discussions or open an issue! 🚀
FAQs
OakFrame Design Library & Components
The npm package oakd receives a total of 46 weekly downloads. As such, oakd popularity was classified as not popular.
We found that oakd demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.