Gathering detailed insights and metrics for @commercetools-uikit/primary-button
Gathering detailed insights and metrics for @commercetools-uikit/primary-button
Gathering detailed insights and metrics for @commercetools-uikit/primary-button
Gathering detailed insights and metrics for @commercetools-uikit/primary-button
npm install @commercetools-uikit/primary-button
Typescript
Module System
Node Version
NPM Version
70.3
Supply Chain
82.8
Quality
95.6
Maintenance
100
Vulnerability
99.3
License
TypeScript (59.12%)
JavaScript (36.8%)
MDX (2.8%)
CSS (1.02%)
HTML (0.16%)
Prolog (0.06%)
Shell (0.04%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
148 Stars
3,452 Commits
27 Forks
15 Watchers
124 Branches
351 Contributors
Updated on Jul 09, 2025
Latest Version
20.2.2
Package Id
@commercetools-uikit/primary-button@20.2.2
Unpacked Size
259.40 kB
Size
25.38 kB
File Count
12
NPM Version
10.9.2
Node Version
22.17.0
Published on
Jul 08, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Primary buttons are used for a primary action on a page. You must also pass a label for accessibility reasons.
yarn add @commercetools-uikit/primary-button
npm --save install @commercetools-uikit/primary-button
Additionally install the peer dependencies (if not present)
yarn add react
npm --save install react
1import PrimaryButton from '@commercetools-uikit/primary-button'; 2import { InformationIcon } from '@commercetools-uikit/icons'; 3 4const Example = () => ( 5 <PrimaryButton 6 iconLeft={<InformationIcon />} 7 label="A label text" 8 onClick={() => alert('Button clicked')} 9 isDisabled={false} 10 /> 11); 12 13export default Example;
Props | Type | Required | Default | Description |
---|---|---|---|---|
as | TStringOrComponent | You may pass in a string like "a" to have the button element render an anchor tag, or
you could pass in a React Component, like a Link .
The <PrimaryButton> additionally accepts any props or attributes specific to the given element or component. | ||
type | union Possible values: 'button' , 'reset' , 'submit' | 'button' | Used as the HTML type attribute. | |
label | string | ✅ | Should describe what the button does, for accessibility purposes (screen-reader users) | |
iconLeft | ReactElement | The left icon displayed within the button. | ||
iconRight | ReactElement | The right icon displayed within the . | ||
isToggleButton | boolean | false | If this is active, it means the button will persist in an "active" state when toggled (see isToggled ), and back to normal state when untoggled | |
isToggled | boolean | Tells when the button should present a toggled state. It does not have any effect when isToggleButton is false . | ||
isDisabled | boolean | Tells when the button should present a disabled state. | ||
onClick | Function See signature. | Handler when the button is clicked.
Required when as is undefined | ||
size | union Possible values: TLegacySizes , TSizes | '20' | Sets the size of the button.
small , medium , and big are deprecated. Use 10 , 20 , instead. | |
tone | union Possible values: 'urgent' , 'primary' , 'critical' | 'primary' | Indicates the color scheme of the button. |
onClick
1( 2 event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement> 3) => void
The component further forwards all valid HTML attributes to the underlying button
component.
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
SAST tool is run on all commits
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
2 existing vulnerabilities detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More