x
1
<div class="rpf-input-field"><label for="fruit" class="rpf-label">Sort by<small class="rpf-label__hint">Please select which berry to sort by</small></label><select id="fruit" class="rpf-input rpf-input-select"><option value="">Please select</option><option value="blueberry">blueberry</option><option value="raspberry">raspberry</option><option value="gooseberry">gooseberry</option></select></div>
1
2
3
4
5
6
7
modifiers = [readonly ? :readonly : nil,
disabled ? :disabled : nil,
full_width ? 'full-width' : nil].compact
error = 'Error: Berry selection is required' if error
options = safe_join(%w[blueberry raspberry gooseberry].map { |v| tag.option(v, value: v) })
render DesignSystem::Form::SelectInputComponent.new(options:, id: :fruit, label:, hint:, include_blank:, modifiers:,
error:)
Param Description Input

The label content

The hint content

Copy to include as a blank option at the top of the select.

Is the input disabled?

Is the input read only?

Show an error messsage?

Should the input be full-width?