@rightui/switch
TypeScript icon, indicating that this package has built-in type declarations

0.3.28 • Public • Published

@rightui/switch

An unstyled, lightweight, keyboard-friendly switch component for your React app.

Installation

yarn add @rightui/switch

npm i @rightui/switch

Usage

import Switch from '@rightui/switch';

const [isChecked, setIsChecked] = useState(false);

const App = () => (
    <Switch
        label='Enable Notifications'
        checked={isChecked}
        onChecked={(checked) => setIsChecked(checked)}
    />
);

Documentation

View full documentation

Example

Checkout the component in Sandbox.

Accessibility

Follows the WAI-ARIA Authoring Practices.

Package Sidebar

Install

npm i @rightui/switch

Weekly Downloads

0

Version

0.3.28

License

MIT

Unpacked Size

43.5 kB

Total Files

14

Last publish

Collaborators

  • wpickeral