Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Shows a toggle switch using Fluent UI Toggle component.
import React, { useState } from 'react';
import { Toggle, Stack } from '@fluentui/react';
const ToggleExample = () => {
const [on, setOn] = useState(false);
return (
<Stack horizontalAlign='center' verticalAlign='center' verticalFill styles={{ root: { minHeight: '100vh' } }}>
<Toggle label='Enable Feature' checked={on} onChange={(e, checked) => setOn(!!checked)} />
<div>{on ? 'Feature Enabled' : 'Feature Disabled'}</div>
</Stack>
);
};
export default ToggleExample;Fluent UI is a React-based front-end framework developed by Microsoft that provides a set of customizable, accessible, and enterprise-ready UI components for building modern web applications.
Origin & Creator
Created by Microsoft (initially as Office UI Fabric) in 2016 to standardize UI for Office and enterprise apps.
Industrial Note
Fluent UI is widely used in Microsoft ecosystems, Office 365 integrations, and enterprise web applications requiring consistency with Microsoft design guidelines.