0.16.3 • Published 8 months ago

@justeattakeaway/pie-form-label v0.16.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

@justeattakeaway/pie-form-label

Source Code | Design Documentation | NPM

@justeattakeaway/pie-form-label is a Web Component built using the Lit library. It provides a flexible and accessible label component for form inputs.

Table of Contents

Installation

Installation

To install any of our web components in your application, we would suggest following the getting started guide to set up your project.

Ideally, you should install the component using the @justeattakeaway/pie-webc package, which includes all of the components. Or you can install the individual component package.

Documentation

Properties

PropOptionsDescriptionDefault
forThe native for HTML attribute.undefined
optionalOptional text to be placed next to the main label.undefined
trailingWhat the trailing text of the label component should be.undefined

Slots

SlotDescription
defaultThe default, unnamed slot is used to pass in text to the component.

CSS Variables

This component does not expose any CSS variables for style overrides.

Events

This component does not emit any custom events. In order to add event listening to this component, you can treat it like a native HTML element in your application.

Usage Examples

For HTML:

// import as module into a js file e.g. main.js
import '@justeattakeaway/pie-webc/components/form-label.js';
<pie-form-label for="username" trailing="X of X">Label</pie-form-label>
<pie-text-input id="username" name="username" type="text"></pie-text-input>
<script type="module" src="/main.js"></script>

For Native JS Applications, Vue, Angular, Svelte etc.:

// Vue templates (using Nuxt 3)
import '@justeattakeaway/pie-webc/components/form-label.js';

<pie-form-label for="username" trailing="X of X">Label</pie-form-label>
<pie-text-input id="username" name="username" type="text"></pie-text-input>

For React Applications:

import { PieFormLabel } from '@justeattakeaway/pie-webc/react/form-label.js';

<PieFormLabel for="username" trailing="X of X">Label</PieFormLabel>
<PieTextInput id="username" name="username" type="text" />

Questions and Support

If you work at Just Eat Takeaway.com, please contact us on #help-designsystem. Otherwise, please raise an issue on Github.

Contributing

Check out our contributing guide for more information on local development and how to run specific component tests.

0.14.5

11 months ago

0.14.4

1 year ago

0.15.0

10 months ago

0.15.1

10 months ago

0.16.3

8 months ago

0.16.0

8 months ago

0.16.1

8 months ago

0.16.2

8 months ago

0.14.2

1 year ago

0.14.3

1 year ago

0.13.6

2 years ago

0.13.5

2 years ago

0.14.0

1 year ago

0.14.1

1 year ago

0.13.4

2 years ago

0.13.3

2 years ago

0.13.2

2 years ago

0.13.1

2 years ago

0.13.0

2 years ago

0.13.0-alpha.0

2 years ago

0.12.2

2 years ago

0.12.1

2 years ago

0.12.0

2 years ago

0.11.0

2 years ago

0.10.1

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.5

2 years ago

0.8.4

2 years ago

0.8.3

2 years ago

0.8.2

2 years ago

0.8.2-next.0

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.0

2 years ago