Option
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.
Recommended practices
- 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
| Popis | Označí položku ako vybranú. |
| Atribút | selected |
| Typ | boolean |
| Predvolené | false |
value
| Popis | Nastavuje aktuálnu hodnotu komponentu. |
| Atribút | value |
| Typ | string |
| Predvolené | - |
Events
| Názov | Popis |
|---|---|
wje-option:change | Vyvolá sa pri zmene hodnoty komponentu. |
Methods
optionClickCallback
| Popis | Spracuje callback optionClickCallback, ktorý vyvoláva životný cyklus hostiteľa. |
| Signatúra | (e: Event) => void |
CSS shadow parts
| Názov | Popis |
|---|---|
native | Štýluje koreňovú shadow časť komponentu. |
CSS custom variables
Pre tento komponent nie sú dostupné žiadne vlastné CSS vlastnosti.
Slots
| Názov | Popis |
|---|---|
start | Slot pre obsah zobrazený pred hlavným obsahom. |
default | Predvolený slot pre hlavný obsah komponentu. |
end | Slot pre obsah zobrazený za hlavným obsahom. |