Norsk Tipping Design System

ExpDateInput

Install

yarn add @ntds/text-input

Import

import { ExpDateInput } from '@ntds/text-input';

Props

PropTypeDefaultDescription
valuestringThe value of the ExpDateInput
setValue(value: string) => voidPass your setter from useState() directly here
label?stringWhether or not the labels should be included.
hideIcon?booleanWhether or not the `Icon` should be displayed.
error?string | boolean | ((id: string) => ReactNode)Mark the input as invalid both visually and semantically Given as a `string`: Will render the message inside a Message component under the input Will not use aria-live Given as a `ReactNode`: Will render the content with margin dictated by the TextInput Use the `Message` component from @ntds /message
errorAriaLiveAssertive?booleanOverride aria live for error message
elementRef?Ref<HTMLInputElement>Get the DOM-reference from the TextInput-element
tw?TwGroupKeysTailwind overrides

On this page