Skip to content

v1.1.0 - Toggle Mode πŸ”˜

Latest

Choose a tag to compare

@boranfurkan boranfurkan released this 03 Dec 20:01
· 3 commits to main since this release

v1.1.0 - Toggle Mode πŸ”˜

πŸš€ New Features

πŸ”˜ Toggle Mode - Transform buttons into interactive toggle switches with persistent pressed states

  • toggle prop to enable toggle/switch functionality
  • defaultActive prop for uncontrolled toggle state
  • onChange callback for toggle state changes
  • active prop for controlled mode support
  • Works seamlessly with all button variants and themes
  • Smooth animations without initial render flash

πŸ› Bug Fixes

  • 🎨 Fixed SVG icon color inheritance - Icons now properly inherit text color using currentColor
  • ⚑ Fixed initial render flash for buttons with defaultActive={true}
  • πŸ–ŒοΈ Fixed icon fill color issues across different button types

πŸ“š Documentation

  • Added comprehensive toggle mode examples in README
  • Added toggle showcase page in demo app
  • Updated API reference with toggle props
  • Added controlled and uncontrolled usage examples

πŸ”— Links

πŸ“¦ Installation

npm install react-3d-button@1.1.0

⭐ Quick Example

import { Button3D } from 'react-3d-button';
import 'react-3d-button/dist/styles.css';

const [notifications, setNotifications] = useState(true);

<Button3D
  type="success"
  toggle
  active={notifications}
  onChange={setNotifications}
>
  {notifications ? 'βœ“ ON' : 'OFF'}
</Button3D>

🎯 Toggle Mode Use Cases

  • Settings Panels - Dark mode, notifications, wifi toggles
  • Feature Flags - Enable/disable application features
  • Form Inputs - Binary choices with visual feedback
  • Status Indicators - Show on/off states
  • Interactive UI - Any switch/toggle interaction

πŸ“ Breaking Changes

None - This is a backward compatible feature addition.

πŸ™ Credits

Thank you to all users who requested toggle functionality!