
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
@ematipico/react-multi-labels
Advanced tools
Provide static labels to your application, whichever language you want
Provide static labels to your application, whichever language you want
React multi labels rely on the React 16.3.*, this means that if you use an earlier version, it won't work.
Fist of all you have to initialize the provider by giving it the default language of our labels and the labels themselves:
import { LabelsProvider } from 'react-multi-labels';
import { App } from './app';
import React from 'react';
import { render } from 'react-dom';
const labels = {
en_GB: {
REMOVE: 'Remove',
CREATE: 'Create',
CHANGE: 'Change',
EDIT: 'Edit'
},
it_IT: {
REMOVE: 'Rimuovi',
CREATE: 'Crea',
CHANGE: 'Cambia',
EDIT: 'Modifica'
}
}
// 'en_GB' will be the first language
render(
<LabelsProvider language={'en_GB'} labels={labels}>
<App />
</LabelsProvider>
document.getElementById('app')
)
The library provides different high order components to consume your labels.
import { Label } from 'react-multi-labels';
function Button() {
return (
<button>
<Label text={'REMOVE'} />
</button>
);
}
// result will be <button>Remove</button> for 'en_GB'
// result will be <button>Rimuovi</button> for 'it_IT'
It simply returns the label that you want. It doesn't return any markup. Only text. If it doesn't exist, it will return undefined
High Order Component to return the label, so you can provide it all your components
import { GetLabels } from 'react-multi-labels';
import { Button } from './Button';
function Form() {
return (
<GetLabel text={'REMOVE'}>
{label => {
return <Button buttonLabel={label} />;
}}
</GetLabel>
);
}
Sometimes you need to retrieve multiple labels in one go. You can use this guy. It's an high order component that requires an array of the labels that you want and it returns an object, so you can identify your labels with their own name.
import { GetLabels } from 'react-multi-labels';
import { Button } from './Button'
import React from 'react'
function Form () {
return (
<GetLabels list={['REMOVE', 'CREATE']}>
{({ REMOVE, CREATE }) => {
return (
<React.Fragment>
<Button buttonLabel={CREATE} />
<Button buttonLabel={REMOVE} />
</React.Fragment>
)
}}
</GetLabel>
)
}
import { GetLabels, ChangeLanguage } from 'react-multi-labels';
import { Button } from './Button';
import React from 'react';
function Form() {
return (
<GetLabels list={['REMOVE', 'CHANGE']}>
{({ REMOVE, CHANGE }) => {
return (
<React.Fragment>
<Button buttonLabel={REMOVE} />
<ChangeLanguage>
{changeLanguage => {
<Button
buttonLabel={CHANGE}
onClick={() => changeLanguage('it_IT')}
/>;
}}
</ChangeLanguage>
</React.Fragment>
);
}}
</GetLabels>
);
}
FAQs
Provide static labels to your application, whichever language you want
The npm package @ematipico/react-multi-labels receives a total of 9 weekly downloads. As such, @ematipico/react-multi-labels popularity was classified as not popular.
We found that @ematipico/react-multi-labels demonstrated a not healthy version release cadence and project activity because the last version was released 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
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.