
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@elemental-ui-alpha/field
Advanced tools
The field package exposes the elements around form inputs, and an API to compose them.
import { Field, FieldDescription, FieldLabel, FieldMessage } from '@elemental-ui-alpha/field';
The Field component is lower level building block for generating custom
components.
Using a render prop, the field component connects the label, description, and message to the input element.
<Field
label="Field label"
description="We will never share your information with third parties"
message="This field is required"
>
{({ inputProps }) => <TextInput {...inputProps} />}
</Field>
If the layout of the Field component doesn't work for you, or for any other
reason, you can compose the elements below in a way that suites. Please be
mindful to maintain accessibility.
A styled div element, intended to describe the field's intention.
<FieldDescription>
Provide additional information, where the label will not suffice.
</FieldDescription>
A styled label element
<FieldLabel>Field label</FieldLabel>
A styled div element, intended to provide users with a "tonal" message within the context of a field.
<>
<FieldMessage>A neutral message</FieldMessage>
<FieldMessage tone="positive">A positive message</FieldMessage>
<FieldMessage tone="critical">A critical message</FieldMessage>
</>
You must maintain accessibility when composing the elements yourself to create a custom component.
let [value, setValue] = useState('');
let [touched, setTouched] = useState(false);
let inputId = 'composed-input';
let messageId = 'composed-message';
let descriptionId = 'composed-description';
let isInvalid = !value && touched;
return (
<Columns
columns={8}
gap={['small', null, null, null, 'xxlarge']}
collapse="xlarge"
>
<Column span={3}>
<FieldLabel htmlFor={inputId}>Email</FieldLabel>
<FieldDescription id={descriptionId}>
Use your company email
</FieldDescription>
</Column>
<Column span={5}>
<TextInput
aria-describedby={isInvalid ? messageId : descriptionId}
id={inputId}
name="email"
onBlur={() => setTouched(true)}
onChange={e => setValue(e.target.value)}
type="email"
value={value}
/>
{isInvalid && (
<FieldMessage id={messageId} tone="critical">
The email field is required
</FieldMessage>
)}
</Column>
</Columns>
);
FAQs
The field package exposes the elements around form inputs, and an API to compose them.
We found that @elemental-ui-alpha/field demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.