Skip to content

HTML Types

The package includes a collection of useful TypeScript types that can help with HTML-related use-cases in browser applications.

Interfaces

SelectOption

Defined in: index.ts:39

Represents an option element’s data. May be used for select, datalist and similar elements.

Properties

label

label: string

Defined in: index.ts:41

value

value: string

Defined in: index.ts:40

Type Aliases

InputType

InputType: typeof InputType[keyof typeof InputType]

Defined in: index.ts:5

Valid input types according to the HTML specification.

See

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types

Variables

InputType

const InputType: object

Defined in: index.ts:5

Valid input types according to the HTML specification.

Type declaration

button

readonly button: "button" = 'button'

checkbox

readonly checkbox: "checkbox" = 'checkbox'

color

readonly color: "color" = 'color'

date

readonly date: "date" = 'date'

datetimeLocal

readonly datetimeLocal: "datetime-local" = 'datetime-local'

email

readonly email: "email" = 'email'

file

readonly file: "file" = 'file'

hidden

readonly hidden: "hidden" = 'hidden'

image

readonly image: "image" = 'image'

month

readonly month: "month" = 'month'

number

readonly number: "number" = 'number'

password

readonly password: "password" = 'password'

radio

readonly radio: "radio" = 'radio'

range

readonly range: "range" = 'range'

reset

readonly reset: "reset" = 'reset'

readonly search: "search" = 'search'

submit

readonly submit: "submit" = 'submit'

tel

readonly tel: "tel" = 'tel'

text

readonly text: "text" = 'text'

time

readonly time: "time" = 'time'

url

readonly url: "url" = 'url'

week

readonly week: "week" = 'week'

See

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types