Skip to main content

Option

shadow

The Option element represents the various options within the [Select] component(./select). It is similar to the standard HTML select element and allows users to make one or more selections based on the configuration of the select component. These elements can be dynamically populated and are designed to work seamlessly with the wje-select component's custom logic, including features such as multiple selection and custom styling.

For information on using Option, navigate to the Select. element documentation.

When to use

Use the wje-select-option when you want to solve a given UI problem consistently within the WebJET design system.

When not to use

Do not use a component outside of its responsibility; in an atypical case, prefer to assemble multiple smaller components.

Accessibility

Check keyboard controls, focus states, contrast and clear naming of interactive elements.

  • Prefer API component over manual DOM interventions.
  • Stick to design tokens and consistent naming conventions.
  • Before deployment, test the component in real data scenarios.

Attributes and properties

selected

PopisOznačí položku ako vybranú.
Atribútselected
Typboolean
Predvolenéfalse

value

PopisNastavuje aktuálnu hodnotu komponentu.
Atribútvalue
Typstring
Predvolené-

Events

NázovPopis
wje-option:changeVyvolá sa pri zmene hodnoty komponentu.

Methods

optionClickCallback

PopisSpracuje callback optionClickCallback, ktorý vyvoláva životný cyklus hostiteľa.
Signatúra(e: Event) => void

CSS shadow parts

NázovPopis
nativeŠtýluje koreňovú shadow časť komponentu.

CSS custom variables

Pre tento komponent nie sú dostupné žiadne vlastné CSS vlastnosti.

Slots

NázovPopis
startSlot pre obsah zobrazený pred hlavným obsahom.
defaultPredvolený slot pre hlavný obsah komponentu.
endSlot pre obsah zobrazený za hlavným obsahom.