TailwindLiveComponents.NumberInput (tailwind_live_components v0.1.11) View Source

Link to this section Summary

Functions

Renders the number input

Renders the slider number input

Link to this section Functions

Renders the number input

<.number_input form={f} field={:value} label="Number Input" min="5" max="10" step="2" />

Options

  • form - The form identifier
  • field - The field name
  • label - The text for the generated <label> element
  • value - The current value for the input
  • autocomplete - Optional autocomplete attribute
  • detail - Optional detail shown below the input
  • min - min value for input
  • max - max value for input
  • step - Optional step for input
  • value - Optional field value
  • placeholder - Optional placeholder
  • error - Optional error message
  • theme - Optional theme to use for Tailwind classes

Renders the slider number input

<.slider form={f} field={:value} label="Slider Input" min="10" max="100" step="2" prefix="$" />

Options

  • form - The form identifier
  • field - The field name
  • label - The text for the generated <label> element
  • min - min value for input
  • max - max value for input
  • step - Optional step for input
  • prefix - Optional prefix
  • value - Optional field value
  • placeholder - Optional placeholder
  • error - Optional error message
  • theme - Optional theme to use for Tailwind classes