React Construct

React Construct is a library of low-level react components used to construct reusable UI components.

This library is under development. A NPM module will be made available when it is ready.

Component:

ContentReveal

A component for showing/hiding content with a smooth transition.

But though Death searched for the third brother for many years, he was never able to find him. It was only when he attained a great age that the youngest brother finally took off the Cloak of Invisibility and gave it to his son. And then he greeted Death as an old friend, and went with him gladly, and, equals, they departed this life.

jsxcss
const Example = () => {
  const [isVisible, setIsVisible] = useState(true);

  return (
    <>
      <ContentReveal visible={isVisible}>
        <p>
          But though Death searched for the third brother for many years, he was
          never able to find him. It was only when he attained a great age that
          the youngest brother finally took off the Cloak of Invisibility and
          gave it to his son. And then he greeted Death as an old friend, and
          went with him gladly, and, equals, they departed this life.
        </p>
      </ContentReveal>

      <button
        onClick={() => setIsVisible((state) => !state)}
        className={s.button}
      >
        {isVisible ? 'Close' : 'Open'}
      </button>
    </>
  );
}