
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@rn-components-kit/button
Advanced tools
English | 中文
Button component. It supports the following features:
default, primary, success, warning and danger five themessmall, default and large three sizessquare, default and round three shapesicon buttons and customize icon directionoutline style buttonblock level buttonlink style buttonnpm install @rn-components-kit/button --save
| Preview | Code |
|---|---|
![]() | Demo1 Code |
![]() | Demo2 Code |
![]() | Demo3 Code |
| Demo4 Code | |
![]() | Demo5 Code |
![]() | Demo6 Code |
![]() | Demo7 Code |
styleAllow you to customize style
| Type | Required | Default |
|---|---|---|
| object | no | - |
textText to display in button
| Type | Required | Default |
|---|---|---|
| string | no | - |
iconIcon to display in button
| Type | Required | Default |
|---|---|---|
| Icon Preset | no | - |
iconLeftDetermines icon's direction in button is left or right
| Type | Required | Default |
|---|---|---|
| boolean | no | true |
typeButton type, determines button's theme
| Type | Required | Default |
|---|---|---|
enum('default' | 'primary' | 'success' | 'warning' | 'danger' | 'link') | no | 'default' |
sizeButton size
| Type | Required | Default |
|---|---|---|
enum('small' | 'default' | 'large') | no | 'default' |
shapeButton Shape
| Type | Required | Default |
|---|---|---|
enum('default' | 'round' | 'square') | no | 'default' |
blockBlock level button
| Type | Required | Default |
|---|---|---|
| boolean | no | false |
outlineApplies outline button style
| Type | Required | Default |
|---|---|---|
| boolean | no | false |
linkApplies link button style
| Type | Required | Default |
|---|---|---|
| boolean | no | false |
updatePresetupdatePreset(preset);
This method offers an opportunity to change button presetted style. The preset is:
{
"theme": {
"default": "#EFEFEF",
"primary": "#40A9FF",
"warning": "#E6A23C",
"danger": "#D9534F",
"success": "#67C23A"
},
"small": {
"fontSize": 12,
"borderRadius": 4,
"paddingHorizontal": 10,
"paddingVertical": 5,
"iconTextSpacing": 5
},
"default": {
"fontSize": 14,
"borderRadius": 4,
"paddingHorizontal": 12,
"paddingVertical": 6,
"iconTextSpacing": 7
},
"large": {
"fontSize": 18,
"borderRadius": 4,
"paddingHorizontal": 16,
"paddingVertical": 10,
"iconTextSpacing": 9
}
}
FAQs
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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.