Gathering detailed insights and metrics for @commercetools-uikit/flat-button
Gathering detailed insights and metrics for @commercetools-uikit/flat-button
Gathering detailed insights and metrics for @commercetools-uikit/flat-button
Gathering detailed insights and metrics for @commercetools-uikit/flat-button
npm install @commercetools-uikit/flat-button
Typescript
Module System
Node Version
NPM Version
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/flat-button@20.2.2
Unpacked Size
61.08 kB
Size
11.27 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
Flat buttons are minimal and a flat variation of primary and secondary buttons.
yarn add @commercetools-uikit/flat-button
npm --save install @commercetools-uikit/flat-button
Additionally install the peer dependencies (if not present)
yarn add react
npm --save install react
1import FlatButton from '@commercetools-uikit/flat-button'; 2import { InformationIcon } from '@commercetools-uikit/icons'; 3 4const Example = () => ( 5 <FlatButton 6 tone="primary" 7 icon={<InformationIcon />} 8 label="A label text" 9 onClick={() => alert('Button clicked')} 10 isDisabled={false} 11 /> 12); 13 14export 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 <FlatButton> additionally accepts any props or attributes specific to the given element or component. | ||
tone | union Possible values: 'primary' , 'secondary' , 'inverted' , 'critical' | 'primary' | Indicates the color scheme of the button. | |
type | union Possible values: 'submit' , 'reset' , 'button' | 'button' | Used as the HTML type attribute. | |
label | string | ✅ | Should describe what the button is for. | |
onClick | Function See signature. | Handler when the button is clicked. | ||
icon | ReactElement | The icon of the button. | ||
iconPosition | union Possible values: 'left' , 'right' | 'left' | The position of the icon. | |
isDisabled | boolean | false | Determines if the button is disabled.
Note that this influences the tone and onClick will not be triggered in this state. |
onClick
1( 2 event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement> 3) => void
Main Functions and use cases are:
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