You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@spectrum-web-components/help-text

Package Overview
Dependencies
Maintainers
7
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spectrum-web-components/help-text

Web component implementation of a Spectrum design HelpText


Version published
Weekly downloads
2.4K
decreased by-5.31%
Maintainers
7
Created
Weekly downloads
 

Changelog

Source

0.42.0 (2024-03-19)

Bug Fixes

  • action-group: manage Action Button selection through multiple slots (4d02b46)
  • allowing split view to have a custom aria label (#4155) (d9abed7)
  • badge: expand and update variant availability and mod override usage (#4162) (19e1a49)
  • button: prevent pointer interaction of child/slotted content (2cd5823)
  • color-field: added missing dependencies (#4141) (b3bb23a)
  • menu: release synthetic "click" promise to unblock keyboard interactions (f8aecf3)
  • overlay: prevent focus based hover interaction without :focus-visible (79337ff)
  • overlay: prioritize non-"hint" Overlays on the same trigger (b9833f3)
  • picker: add loading state to the picker (#3110) (d91e2c9)
  • picker: allow open/close in tablet (dcfc96e)
  • picker: correctly process the CSS for the quiet hover effect (#4167) (eb282fa)
  • progress-bar: remove aria-label only if set by label and label is empty; add tests (d351451)
  • progress-circle: remove aria-label only when set by label and changed label is empty (cdd181a)
  • styles, theme: surface exports that omit Spectrum Vars proactively (#4142) (5b524c1)
  • swatch: allow Swatch Group to manage selection through multiple slots (f333379)
  • tab-overflow: improve tab navigation experience and support custom aria labels (#4165) (9c9bf95)
  • theme: deprecate lightest and darkest color stops (#4179) (0c01a66)
  • truncated: add truncated package (#4163) (4ba0480)

Features

Reverts

Readme

Source

Description

An <sp-help-text> provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.

Usage

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

yarn add @spectrum-web-components/help-text

Import the side effectful registration of <sp-help-text> via:

import '@spectrum-web-components/help-text/sp-help-text.js';

When looking to leverage the HelpText base class as a type and/or for extension purposes, do so via:

import { HelpText } from '@spectrum-web-components/help-text';

Sizes

Small
<sp-help-text size="s">Passwords must be at least 8 characters.</sp-help-text>
Medium
<sp-help-text size="m">Passwords must be at least 8 characters.</sp-help-text>
Large
<sp-help-text size="l">Passwords must be at least 8 characters.</sp-help-text>
Extra Large
<sp-help-text size="xl">Passwords must be at least 8 characters.</sp-help-text>

Negative

The negative variant of <sp-help-text> is used to convey error messages. An error message should be different than the informative message otherwise delivers to the visitor and should show a solution for correcting the error that has been encountered.

<sp-help-text variant="negative">
    Create a password with at least 8 characters.
</sp-help-text>

Icon

When associated with content that does not supply an icon outlining the presence of an error, use the icon attribute to display one as part of the <sp-help-text> element.

<sp-help-text variant="negative" icon>
    Create a password with at least 8 characters.
</sp-help-text>

Disabled

When associated to content the is disabled, use the disabled attribute to match the delivery of the <sp-help-text> element to that content.

<sp-help-text disabled>Passwords must be at least 8 characters.</sp-help-text>

Keywords

FAQs

Package last updated on 19 Mar 2024

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc