ワンクリックで
groww-toggle-switch
Toggle switch component for binary on/off states. Use for settings, preferences, boolean options, or feature toggles.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Toggle switch component for binary on/off states. Use for settings, preferences, boolean options, or feature toggles.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Accordion component with collapsible sections. Use for FAQs, nested content, or expandable details sections.
Button component with variants, sizes, loading states, and icon support. Use when creating clickable actions, forms, or navigation buttons.
Calendar component for date and month selection. Use when building date pickers, scheduling interfaces, or date range selectors.
Carousel component for image/content sliders with navigation controls. Use for image galleries, hero sections, or content that scrolls horizontally.
Checkbox component for boolean or multi-select inputs. Use when building forms with boolean toggles or multiple selection lists.
Dropdown menu component with trigger and content pattern. Use when building selectable menus, action menus, or nested navigation.
| name | groww-toggle-switch |
| description | Toggle switch component for binary on/off states. Use for settings, preferences, boolean options, or feature toggles. |
import ToggleSwitch from '@groww-tech/ui-toolkit/dist/esm/components/atoms/ToggleSwitch';
// or
import { ToggleSwitch } from '@groww-tech/ui-toolkit';
interface ToggleSwitchProps {
isEnabled: boolean; // Current state (required)
handleOnClick: (isEnabled: boolean) => void; // Toggle handler
isDisabled?: boolean; // Disabled state
size?: 'small' | 'medium' | 'large'; // Toggle size
className?: string;
dataTestId?: string;
id?: string;
name?: string;
}
<ToggleSwitch
isEnabled={isEnabled}
handleOnClick={(enabled) => setEnabled(enabled)}
/>
<div className="setting-row">
<span>Enable notifications</span>
<ToggleSwitch
isEnabled={notificationsEnabled}
handleOnClick={setNotificationsEnabled}
/>
</div>
<ToggleSwitch
isEnabled={false}
handleOnClick={() => {}}
isDisabled={true}
/>
const [isOn, setIsOn] = useState(false);
<ToggleSwitch
isEnabled={isOn}
handleOnClick={(enabled) => {
setIsOn(enabled);
trackToggle(enabled);
}}
/>