Norsk Tipping Design System

ExpDateInput

Install

yarn add @ntds/text-input

Import

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

Props

PropTypeDefaultDescription
valuestring—The value of the ExpDateInput
setValue(value: string) => void—Pass your setter from useState() directly here
label?string—Whether or not the labels should be included.
hideIcon?boolean—Whether 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?boolean—Override aria live for error message
elementRef?Ref<HTMLInputElement>—Get the DOM-reference from the TextInput-element
tw?TwGroupKeys—Tailwind overrides

On this page