Reka UI logoReka
backdrop
PropDefaultType
as
'div'
AsTag | Component

The element or component this component should render as. Can be overwritten by asChild.

asChild
boolean

Change the default rendered element for the one passed as a child, merging their props and behavior.

Read our Composition guide for more details.

calendarLabel
string

The accessible label for the year picker

defaultPlaceholder
DateValue

The default placeholder date

defaultValue
DateValue

The default value for the year picker

dir
'ltr' | 'rtl'

The reading direction of the calendar when applicable. If omitted, inherits globally from ConfigProvider or assumes LTR.

disabled
false
boolean

Whether the year picker is disabled

initialFocus
false
boolean

If true, the year picker will focus the selected year, today, or the first year of the range on mount

isYearDisabled
Matcher

A function that returns whether or not a year is disabled

isYearUnavailable
Matcher

A function that returns whether or not a year is unavailable

locale
string

The locale to use for formatting dates

maxValue
DateValue

The maximum date that can be selected

minValue
DateValue

The minimum date that can be selected

modelValue
DateValue | DateValue[]

The controlled checked state of the year picker

multiple
false
boolean

Whether multiple years can be selected

nextPage
((placeholder: DateValue) => DateValue)

A function that returns the next page of the year picker. Receives the current placeholder as an argument.

placeholder
DateValue

The placeholder date, which is used to determine what year range to display when no date is selected

preventDeselect
false
boolean

Whether or not to prevent the user from deselecting a date without selecting another date first

prevPage
((placeholder: DateValue) => DateValue)

A function that returns the previous page of the year picker. Receives the current placeholder as an argument.

readonly
false
boolean

Whether the year picker is readonly

yearsPerPage
12
number

Number of years to display per page

EmitPayload
update:modelValue
[date: DateValue]

Event handler called whenever the model value changes

update:placeholder
[date: DateValue]

Event handler called whenever the placeholder value changes

Slots (default)Payload
date
DateValue

The current date of the placeholder

grid
Grid<DateValue>

The grid of years

locale
string

The year picker locale

modelValue
DateValue | DateValue[] | undefined

The current selected value

MethodsType
isYearDisabled
Matcher

A function that returns whether or not a year is disabled

isYearUnavailable
Matcher

A function that returns whether or not a year is unavailable