Socket
Book a DemoInstallSign in
Socket

@equinor/fusion-wc-button

Package Overview
Dependencies
Maintainers
3
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion-wc-button

<!--prettier-ignore-start--> # @equinor/fusion-wc-button [![Published on npm](https://img.shields.io/npm/v/@equinor/fusion-wc-button.svg)](https://www.npmjs.com/package/@equinor/fusion-wc-button)

Source
npmnpm
Version
1.1.33
Version published
Weekly downloads
657
-35.46%
Maintainers
3
Weekly downloads
 
Created
Source

@equinor/fusion-wc-button

Published on npm

Storybook

Material Web Component

Installation


npm install @equinor/fusion-wc-button

Usage

<fwc-button label="default"></fwc-button>
<fwc-button label="default" icon="settings"></fwc-button>
<fwc-button label="default"><span slot="icon">🚀</span></fwc-button>

Slots

NameDescription
iconLeading icon. Overrides icon property. Use label or the icon property to set the aria-label.
trailingIconIcon to show after the label. Overrides trailingIcon property. Use label or the trailingIcon property to set the aria-label.
defaultDefault content to display between both icons and after label. NOTE: It is highly recommended to set the label property instead of projecting text as it will also set the aria-label

Properties/Attributes

NameTypeDefaultDescription
iconstring''Icon to display, and aria-label value when label is not defined.
labelstring''Label to display for the button, and aria-label.
variantButtonVariant*'contained'Button variant to render, defaults to contained if no variant is defined.
colorButtonColor**'primary'Button color to render, defaults to primary if no color is defined.
densebooleanfalseMakes the button text and container slightly smaller.
disabledbooleanfalseDisabled buttons cannot be interacted with and have no visual interaction effect.
trailingIconbooleanfalseWhen true, icon will be displayed after label.
'expandContent'booleanfalseWhen true, the space after the label and before any trailing icon, where default slotted content is rendered, is expanded to fit the available space inside the button.

* ButtonVariant is exported by fwc-button.


type ButtonVariant = 'contained'|'outlined'|'ghost';

** ButtonColor is exported by fwc-button.


type ButtonColor = 'primary'|'secondary'|'danger';

Keywords

equinor

FAQs

Package last updated on 07 Nov 2022

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