Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-disable

A React component for disabling a section of an app

Kitze Made by Kitze
kitze.io · X · YouTube


More projects by Kitze

Zero To Shipped logo
Zero To Shipped
A full-stack starter kit for web and mobile apps.
Sotto logo
Sotto
Voice-to-text for macOS. Local AI, one-time purchase.
Tinkerer Club logo
Tinkerer Club
A private community for builders, self-hosters, and AI tinkerers.
Sizzy logo
Sizzy
The browser for web developers.
Supermac logo
Supermac
A macOS command center for everyday workflows.
DMX logo
DMX
A focused desktop client for X.

Support this project

Buy me a coffee   Sponsor on GitHub

Sponsors

Postiz logo
Postiz
Schedule social posts with AI agents.
FounderStack logo
FounderStack
A SaaS stack for your business, without subscriptions.
Matte logo
Matte
3D mockups, screen recordings, and video editing.
HTML/CSS to Image logo
HTML/CSS to Image
Turn HTML/CSS into images, PDFs, and screenshots.
NameMyVenti logo
NameMyVenti
Get your brand shouted out at Starbucks.



🙅‍♂️ react-disable

Other projects by @thekitze

  • 💻 Sizzy - A browser for developers and designers
  • 🏫 React Academy - Interactive React and GraphQL workshops
  • 💌 Twizzy - A standalone app for Twitter DM
  • 🤖 JSUI - A powerful UI toolkit for managing JavaScript apps

Demo

demo

Usage

yarn add react-disable

Just wrap any children with the Disable component in order to disable the section. The disabled sections are also aware if a parent is disabled, so they will be disabled, but the styles won't be duplicated (the opacity won't be multiplied, etc.)

import { Disable } from 'react-disable';

const App = () => {
  const [disableForm, setDisableForm] = React.useState(false);
  const toggle = () => setDisableForm(d => !d);

  return (
    <div>
      <h1>Hello world</h1>
      <button onClick={toggle}>toggle disable form</button>

      <Disable disabled={disableForm}>
        <h3>Login form </h3>
        <input placeholder="username" type="text" />
        <input placeholder="password" type="text" />
        <button>submit</button>
      </Disable>

    </div>
  );
};

More projects by Kitze

Apps & tools

gifs.so
Search, copy, and download reaction GIFs.
Glink
Feedback, roadmaps, changelogs, and discussions.
Benji
Tasks, habits, calendar, health, and routines in one place.
Perkz
Sell and manage access to private GitHub repositories.
JustWrite
Distraction-free writing sprints for macOS, with time or word-count goals.
Releaseflow
App updates and downloads.
Passlock
A macOS password manager with time locks and unlock challenges.

Open source

Skillbox
A self-hosted, versioned skills library for AI agents.
Unclutter
Remove page clutter with AI-powered, reusable browser rules.
PageGrade
Grade page clarity, writing, and on-page SEO.
Council
Let your coding agents deliberate together before making a plan.
CodexMaxx
Manage Codex accounts, usage, and active sessions on macOS.
React Hanger
A collection of useful React hooks.
React Genie
Animate React elements as they enter the viewport.
MobX Router
A simple router for MobX and React apps.

All projects · GitHub · Follow on X · YouTube

About

A React component for disabling a section of an app

Resources

Stars

76 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages