Skip to main content

Option

<gstock-option> | GstockOption

API

Properties

Name Description Reflects Type Default
disabled Draws the option in a disabled state, preventing selection. Reflects boolean false
prefix The prefix icon name. string ''
suffix The suffix icon name. string ''
size The size of the option. Reflects 'small' | 'medium' | 'large' 'medium'
value The option’s value. When selected, the containing form control will receive this value. The value must be unique from other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing multiple values. Reflects string ''
updateComplete

A read-only promise that resolves when the component has finished updating.

Learn more about attributes and properties .

Slots

Name Description
default The option’s label.
prefix Used to prepend an icon or similar element to the menu item.
suffix Used to append an icon or similar element to the menu item.

Learn more about slots .

Methods

Name Description
getTextLabel( ) Returns a plain text label based on the option’s content.

Learn more about methods .

CSS Parts

Name Description
base The component’s base wrapper.
label The option’s label.
prefix The container that wraps the prefix.
suffix The container that wraps the suffix.

Learn more about CSS parts .

Dependencies

This component automatically imports the following dependencies.