Password
The Password component wraps the Cherry Input with type="password" and adds a show/hide reveal toggle pinned inside the field.
It accepts every Input property except type, $icon, and $iconPosition: type is owned by the component to flip between masked and plain text, and the icon slot is reserved for the reveal button. The reveal button adapts its size to the field's $size automatically.
import React from "react";
import { Password } from "cherry-styled-components";
export default function Page() {
return <Password $label="Password" $fullWidth id="password" />;
}With sizes and validation states:
<Password $size="big" $fullWidth />
<Password $error $fullWidth />Properties
Label text displayed above the input.
Size of the input. The reveal button scales with it.
Shows error state styling on the field and the reveal button.
Shows success state styling.
Makes the input span the full width of its container.
Class name applied to the wrapper element around the input, for restyling from the outside.
Cherry theme object.
The reveal toggle manages aria-pressed and swaps its accessible label
between "Show password" and "Hide password" automatically.