Beta

Utilities

hasErrorInput

A utility to set the style of erroneous input elements globally.

You can use the hasErrorInput utility to ensure that all input components have the same error style. This approach lets you style the error state once, rather than having to do it for each component individually.

Components using this utility:

  • DatePicker
  • Input
  • Select
  • SelectNative
  • Textarea

Installation

  1. 1

    Add the following code to your utils.ts file.

    // Tremor Raw hasErrorInput [v0.0.1]
    export const hasErrorInput = [  // base  "ring-2",  // border color  "border-red-500 dark:border-red-700",  // ring color  "ring-red-200 dark:ring-red-700/30",]