1.8.1 • Published 10 months ago

@finastra/formfield v1.8.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Formfield

See it on NPM! How big is this package in your project? Storybook

Usage

A form field is a text caption for FDS input elements including fds-checkbox, fds-radio, and fds-switch.

It is equivalent to the native element in that it forwards user interaction events to the input element. For example, tapping on the label causes the associated input element to toggle and focus.

fds-formfield extends Material web's mwc-formfield-base.

Import

npm i @finastra/formfield
import '@finastra/formfield';
import '@finastra/checkbox';
...
<fds-formfield label="Accept terms and conditions">
    <fds-checkbox checked></fds-checkbox>
</fds-formfield>

API

Properties

PropertyAttributeTypeDefaultDescription
alignEndalignEndbooleanfalseAlign the component at the end of the label..
labellabelstring""The text to display for the label and sets a11y label on input. (visually overriden by slotted label).
nowrapnowrapbooleanfalsePrevents the label from wrapping and overflow text is ellipsed.
spaceBetweenspaceBetweenbooleanfalseAdd space between the component and the label as the formfield grows.

Methods

MethodType
click(): void

CSS Custom Properties

PropertyDefaultDescription
--fds-label-font"#694ED6"Switch color
1.8.1

10 months ago

1.8.0

11 months ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago