Package Exports
- @fluentui/react-switch
- @fluentui/react-switch/lib-commonjs/index.js
- @fluentui/react-switch/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@fluentui/react-switch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@fluentui/react-switch
React Switch components for Fluent UI React
The Switch
control (formerly Toggle
) enables users to trigger an option on or off through pressing on the component.
STATUS: WIP 🚧
These are not production-ready components and should never be used in product. This space is useful for testing new components whose APIs might change before final release.
Usage
To import Switch:
import { Switch } from '@fluentui/react-switch';
Once the Switch component graduates to a production release, the component will be available at:
import { Switch } from '@fluentui/react-components';
Examples
<Switch />
<Switch defaultChecked={true} />
<Switch checked={switchValue} onChange={switchOnChange} />
<Switch disabled />