Skip to main content

Language Menu

It inherits from the ButtonList component. It displays a list of language buttons with or without flags in a 4x3 or 1x1 format. When the number of buttons exceeds a specified threshold (controlled by the maxButtonItems property), the component dynamically transforms into a dropdown menu.

Storybook Docs

Props

LanguageMenu takes a <Data> generic type that extends Record<string, unknown>, to be used by ActionList.

NameTypeDefaultDescription
languages *ILang[]-Is the array of langs of type ILang displayed into the component
squareFormatbooleanfalseDisplays the default 4x3 format, If this prop is set to true, it shows flags in a 1x1 format
...-Extend props from ButtonList component

ILang

NameTypeDescription
countrystring
...extends IOption