Skip to main content

fast-option

An implementation of an option. To avoid namespace collisions with the Option() constructor, the component class is ListboxOption, and our implementation is named fast-option.

The <fast-option> component will only provide internals related to form association when used within a form-associated component such as fast-select or fast-combobox. It will not provide these capabilities when used only with a fast-listbox.

Setup#

import {    provideFASTDesignSystem,    fastOption} from "@microsoft/fast-components";
provideFASTDesignSystem()    .register(        fastOption()    );

Usage#

See fast-select, fast-combobox, or fast-listbox.

Create your own design#

import {    ListboxOption,    listboxOptionTemplate as template,} from "@microsoft/fast-foundation";import { optionStyles as styles } from "./my-listbox-option.styles";
export const myOption = ListboxOption.compose({    baseName: "option",    template,    styles,});

Additional resources#