
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
@commercetools-uikit/label
Advanced tools
The Label component represents the primitive label for a form field component.
The Label component represents the primitive label for a field. It's made to be used with form fields. This component can also indicate if the field is required or not, and give emphasis by being bold.
In order to improve readability, using inverted
tone is recommended on dark backgrounds (E.g in a table header)
import Label from '@commercetools-uikit/label';
import { FormattedMessage } from 'react-intl';
const Example = () => (
<Label isRequiredIndicatorVisible={true} isBold={false} tone="inverted">
<FormattedMessage {...messages.title} />
</Label>
);
export default Example;
Props | Type | Required | Values | Default | Description |
---|---|---|---|---|---|
tone | union Possible values: 'primary' , 'inverted' | - | - | - | Indicates the tone to be applied to the label |
children | ReactNode | ✅ (*) | - | - | Value of the label |
intlMessage | MessageDescriptor | ✅ (*) | - | - | An intl message object that will be rendered with FormattedMessage |
isBold | boolean | - | - | false | Indicates if the label title should be in bold text. This prop is being deprecated in favor of the fontWeight prop |
fontWeight | union Possible values: 'medium' , 'bold' | - | - | regular | Indicates if the label title should be in medium , or bold weighted text, defaults to medium |
isRequiredIndicatorVisible | boolean | - | - | false | Indicates if the labeled field is required in a form |
htmlFor | string | - | - | - | The for HTML attribute, used to reference form elements with the related attribute id or aria-labelledby . |
id | string | - | - | - | The id HTML attribute, used to reference non-form elements with the related attribute aria-labelledby . |
*
:children
is required only ifintlMessage
is not provided, and vice-versa
FAQs
The Label component represents the primitive label for a form field component.
We found that @commercetools-uikit/label demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.