Skip to content

RtkSwitch

A switch component which follows RTK Design System.

Properties

PropertyTypeRequiredDefaultDescription
checkedboolean✅-Whether the switch is enabled/checked
disabledboolean✅-Whether switch is readonly
iconPackIconPack❌defaultIconPackIcon pack
readonlyboolean✅-Whether switch is readonly
tRtkI18n❌useLanguage()Language

Usage Examples

Basic Usage

import { RtkSwitch } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return <RtkSwitch />;
}

With Properties

import { RtkSwitch } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return (
<RtkSwitch
checked={true}
disabled={true}
readonly={true}
/>
);
}