x
1
2
3
<div class="rpf-input-field"><label for="name" class="rpf-label">What is your password?<small class="rpf-label__hint">Please enter your password</small></label>
<div class="rpf-input-password__container " data-controller="design-system--form--password-input-component"><input id="name" class="rpf-input rpf-input-password" autocomplete="current-password" type="password" data-design-system--form--password-input-component-target="input"><button aria-label="Password" data-design-system--form--password-input-component-target="toggle" data-action="click->design-system--form--password-input-component#toggleVisibility:prevent" data-show-text="Show" data-hide-text="Hide" class="rpf-button rpf-input-password__button rpf-button rpf-button--tertiary" type="button">Show</button></div>
<a href="/" class="rpf-link rpf-link--block">Forgot password?</a></div>
1
2
3
4
5
6
7
8
9
10
11
label = 'What is your password?'
hint = 'Please enter your password'
link_text = 'Forgot password?'
modifiers = [readonly ? :readonly : nil, disabled ? :disabled : nil, full_width ? :'full-width' : nil].compact
error = 'Error: Your password is required' if error
type = show ? 'text' : 'password'
render DesignSystem::Form::PasswordInputComponent.new(
label:, hint:, modifiers:, error:, id: :name,
type:, link_text:,
show_text: 'Show', hide_text: 'Hide', link_href: '/'
)
Param Description Input