Share via


Switch

An implementation of a switch as a form-connected web-component.

fluent-switch

Setup

import {
    provideFluentDesignSystem,
    fluentSwitch
} from "@fluentui/web-components";

provideFluentDesignSystem()
    .register(
        fluentSwitch()
    );

Customizing the indicator

import {
    provideFluentDesignSystem,
    fluentSwitch
} from "@fluentui/web-components";

provideFluentDesignSystem()
    .register(
        fluentSwitch({
            switch: `...your switch indicator...`
        })
    );

Example

Please see the Blazor documentation and demo site for more information.

Additional Resources

W3C Component Aria Practices