
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@openpkg-ts/react
Advanced tools
React components for rendering OpenPkg API documentation. Built on @openpkg-ts/ui.
npm install @openpkg-ts/react
Peer deps: react@^18 || ^19, tailwindcss@^4 (optional, for styled)
Unstyled, logic-only components for custom styling.
import {
CollapsibleMethod,
ExampleBlock,
ExpandableProperty,
MembersTable,
MemberRow,
NestedProperty,
ParamTable,
ParamRow,
Signature,
TypeTable,
} from '@openpkg-ts/react';
| Component | Description |
|---|---|
CollapsibleMethod | Expandable method with signature |
ExampleBlock | Code example display |
ExpandableProperty | Property with nested children |
MembersTable | Class/interface members table |
MemberRow | Single member row |
NestedProperty | Nested property display |
ParamTable | Function parameters table |
ParamRow | Single parameter row |
Signature | Type signature renderer |
TypeTable | Type properties table |
Pre-styled with Tailwind v4.
import {
// Full pages
APIPage,
FunctionPage,
ClassPage,
InterfacePage,
EnumPage,
VariablePage,
ExportIndexPage,
FullAPIReferencePage,
// Sections (for composition)
FunctionSection,
ClassSection,
InterfaceSection,
EnumSection,
VariableSection,
ExportSection,
// Utilities
ExportCard,
ParameterItem,
CodeTabs,
ImportSection,
} from '@openpkg-ts/react/styled';
import { FullAPIReferencePage } from '@openpkg-ts/react/styled';
import spec from './openpkg.json';
export default function APIReference() {
return <FullAPIReferencePage spec={spec} />;
}
import { FunctionPage } from '@openpkg-ts/react/styled';
export default function CreateClientPage() {
const fn = spec.exports.find(e => e.name === 'createClient');
return <FunctionPage export={fn} packageName={spec.meta.name} />;
}
import { ExportCard, ParameterItem } from '@openpkg-ts/react/styled';
import { buildSignatureString } from '@openpkg-ts/sdk';
export default function CustomExport({ exp }) {
return (
<ExportCard
name={exp.name}
kind={exp.kind}
signature={buildSignatureString(exp)}
description={exp.description}
>
{exp.signatures?.[0]?.parameters?.map(param => (
<ParameterItem key={param.name} {...param} />
))}
</ExportCard>
);
}
Convert spec data to component props:
import {
specParamToAPIParam,
specSchemaToAPISchema,
specExamplesToCodeExamples,
buildImportStatement,
getLanguagesFromExamples,
} from '@openpkg-ts/react/styled';
import {
cleanCode,
getExampleCode,
getExampleLanguage,
getExampleTitle,
groupMembersByKind,
} from '@openpkg-ts/react';
MIT
FAQs
React components for OpenPkg specs
The npm package @openpkg-ts/react receives a total of 0 weekly downloads. As such, @openpkg-ts/react popularity was classified as not popular.
We found that @openpkg-ts/react 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.