Airframe GitHub Storybook
Component New

ba-input-secure-field

An input component that can be used with the secure fields/PCI proxy library

Airframe

Not Planned

Web Components

Active
Storybook Github

React

Planned

React Native

Planned
Design Code Accessibility QA
A

Label

The label of the input. Gives meaning and context to the input

B

Hint text

Gives the input some extra information to help the user

C

Input

The input of the component. This is just a container which can be used by other libraries to insert a input into.

This component is designed to be used with a secure fields library. This means the component doesn't actually contain an input as this is added via an iFrame when using a secure fields library.

Alternatively an input can be slotted into the component.

<ba-input-secure-field
  label="Card number"
  proxy-id="card-number">
</ba-input-secure-field>
Property Attribute Description Type Default
hasFocus has-focus Whether the input has focus boolean | undefined undefined
hintText hint-text Hint text to show above the input string | undefined undefined
invalid invalid Whether the input is invalid boolean | undefined false
label(required) label Label for the input string undefined
proxyId(required) proxy-id The id of the input string undefined
required required Whether the input is required boolean | undefined false
  • None
Slot Description Permitted elements
"error" Element will be rendered in the error slot <p>

ba-input-secure-field can be slotted into:

Using the component with ba-form. When using with a custom secure library you may need to style the input to match BAgel.

Reach out to us and we can provide the correct styles.

Using the component with ba-form and a custom secure library
<ba-form>
  <ba-input-secure-field
      label="Card number"
      name="cardNumber"
      proxy-id="card-number"
      id="card-number"
      required
    >
  </ba-input-secure-field>
  <ba-button>Submit</ba-button>
</ba-form>

<script>
  // Run any custom library code after the component has loaded
</script>

React documentation coming soon.

React Native documentation coming soon.

Always use the label attribute to give a meaningful label to the field.

Further reading:

Disabled form elements are not supported in BAgel because they create accessibility challenges, such as preventing keyboard navigation, confusing screen reader users, and reducing visual clarity for those with impairments

Further reading:

Placeholders on inputs are not supported in BAgel because they create accessibility challenges, such as failing to provide persistent labels for screen readers, reducing color contrast for users with visual impairments, and causing confusion for those with cognitive difficulties.

If you would like to add a infomations to help the user fill the input, you can use the hint-text attribute.

Further reading:

No keyboard interactions have been defined for this component.

Use this checklist to confirm the component has been configured and used correctly.

  • Make sure a value is added for the proxy-id attribute
  • Make sure a label is provided
Designing Developing Components BAgel helper QA process britishairways.com Careers Cookie policy