Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@forter/button

Package Overview
Dependencies
Maintainers
3
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forter/button

Button from Forter Components

  • 4.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
116
increased by1060%
Maintainers
3
Weekly downloads
 
Created
Source

fc-button

By default, Forter buttons represents UI interactions which are not transactional.

Examples:

<fc-button icon="search">Open Advanced Search</fc-button>
<fc-button secondary-icon="3dots" disabled>Show More</fc-button>
<fc-button>Refresh Filters</fc-button>

Intents

Forter buttons may have an intent, which represents a UI interactions which is transactional.

Apply

The apply intent represents confirmation of a personal transactional operation.

Examples:

<fc-button intent="apply">Edit Metric</fc-button>
<fc-tooltip tooltip="Search for the Current Order">
   <fc-button intent="apply" icon="search">Search</fc-button>
</fc-tooltip>
<fc-button intent="apply"
     secondary-icon="resolved"
     disabled
>Save Settings</fc-button>

Cancel

The cancel intent represents cancellation or termination of a personal transactional operation.

Examples:

<fc-button intent="cancel" label="Restore Defaults"></fc-button>
<fc-tooltip tooltip="Cancel the Chargeback for this Transaction">
   <fc-button intent="cancel" icon="cancel">Cancel Chargeback</fc-button>
</fc-tooltip>
<fc-button intent="cancel"
     secondary-icon="close"
     disabled
>Close Feedback</fc-button>

Success

The success intent represents confirmation of a transactional operation which affects a merchant's site.

Examples:

<fc-button intent="success">Update SSO File</fc-button>
<fc-tooltip tooltip="Release the Order on Forter and on Merchant's ERP">
   <fc-button intent="success" icon="confirmed">Release Order</fc-button>
</fc-tooltip>
<fc-button intent="success"
     secondary-icon="webhook"
     disabled
>Fire Webhook</fc-button>

Danger

The danger intent represents confirmation of a transactional operation which affects a merchant's data and therefore requires the user's attention,

Examples:

<fc-button intent="danger">Force Decline</fc-button>
<fc-tooltip tooltip="Cancel the Order on Forter and on Merchant's ERP">
   <fc-button intent="danger" label="Cancel Order" icon="cancel"></fc-button>
</fc-tooltip>
<fc-button intent="danger"
     secondary-icon="black-list"
     disabled
>Add To Blacklist</fc-button>

Warning

The warning intent represents confirmation of a transactional operation which affects a merchant's site and therefore requires the user's attention.

Examples:

<fc-tooltip tooltip="Remove this User from Forter's Portal">
   <fc-button intent="warn" icon="user">Delete User</fc-button>
</fc-tooltip>
<fc-button intent="warn"
     secondary-icon="cancel"
     disabled
>Delete Saved View</fc-button>
<fc-button intent="warn">Disable Webhook</fc-button>

Layout and Styling

Width

Button's width is auto by default, however you can set it by the width prop as pixels or small,medium and large

Examples:

<fc-button intent="apply" width="small">Narrow Button</fc-button>
<fc-button intent="apply" width="medium">Medium Button</fc-button>
<fc-button intent="apply" width="large">Wide Button</fc-button>
<fc-button intent="apply" width="35px">35px Wide Button</fc-button>

Properties

PropertyAttributeTypeDefaultDescription
activeactivebooleanIf the button is active
disableddisabledbooleanIf the button is disabled
iconiconstringThe button's icon
iconSizeicon-sizestring | number18The icon's icon-size
intentintent"success" | "apply" | "danger" | "cancel" | "warn"The button's intent. See Intents in README.
labellabelstringThe button's label, used when accessible content is not slotted in.
loadingloadingbooleanIf the button represents a loading state
secondaryIconsecondary-iconstringThe button's secondary icon
widthwidthstringThe button's width in px or 'small', 'medium', or 'large'

CSS Custom Properties

PropertyDescription
--fc-button-active-background-colorbutton background colour when active.
--fc-button-active-border-colorbutton border colour when active.
--fc-button-active-box-shadowbutton box shadow when active. default: 0 0 5px 0 rgba(0, 0, 0, 0.05)
--fc-button-active-colorbutton colour when active.
--fc-button-active-icon-coloricon colour when active.
--fc-button-background-colorbutton background colour.
--fc-button-border-radiusbutton border radius.
--fc-button-box-shadowbutton box shadow.
--fc-button-focus-border-colorbutton border colour when focused.
--fc-button-heightbutton height.
--fc-button-hover-background-colorbutton background colour when hovered.
--fc-button-hover-box-shadowbutton box-shadow colour when hovered.
--fc-button-hover-colorbutton box-shadow colour when hovered.
--fc-button-hover-icon-coloricon colour when hovered.
--fc-button-icon-coloricon colour.
--fc-button-inner-marginbutton inner margin.
--fc-button-min-widthbutton min-width. default: 35px;
--fc-button-outer-marginbutton outer margin.
--fc-button-text-transformbutton text transform.

fc-copy

An Element that provides a copy-to-clipboard button.

Properties

PropertyAttributeTypeDescription
clipboardclipboardstringThe text to copy
selectionHTMLElement

Events

EventDescription
copycopy event with the copied text

fc-icon-button

Accessible icon button with discreet default styles

Usage

<fc-icon-button icon="user" label="Profile Page"></fc-icon-button>

Properties

PropertyAttributeTypeDescription
activeactivebooleanIf the button is active
disableddisabledbooleanIf the button is disabled
iconiconstringThe button's icon
labellabelstringThe button's label. Must be passed for accessibility.

CSS Custom Properties

PropertyDescription
--fc-button-active-background-colorbutton background colour when active.
--fc-button-active-border-colorbutton border colour when active.
--fc-button-active-box-shadowbutton box shadow when active. default: 0 0 5px 0 rgba(0, 0, 0, 0.05)
--fc-button-active-colorbutton colour when active.
--fc-button-active-icon-coloricon colour when active.
--fc-button-background-colorbutton background colour.
--fc-button-border-radiusbutton border radius.
--fc-button-box-shadowbutton box shadow.
--fc-button-focus-border-colorbutton border colour when focused.
--fc-button-heightbutton height.
--fc-button-hover-background-colorbutton background colour when hovered.
--fc-button-hover-box-shadowbutton box-shadow colour when hovered.
--fc-button-hover-colorbutton box-shadow colour when hovered.
--fc-button-hover-icon-coloricon colour when hovered.
--fc-button-icon-coloricon colour.
--fc-button-inner-marginbutton inner margin.
--fc-button-min-widthbutton min-width. default: 35px;
--fc-button-outer-marginbutton outer margin.
--fc-button-text-transformbutton text transform.

Keywords

FAQs

Package last updated on 19 Sep 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc