React Components

The React snippet collection contains function components and reusable hooks for React 16.

  • Carousel

    Renders a carousel component.

    React, Components · Nov 3, 2020

  • Toggle

    Renders a toggle component.

    React, Components · Nov 16, 2020

  • Spinning loader

    Renders a spinning loader component.

    React, Components · Nov 16, 2020

  • Textarea with character limit

    Renders a textarea component with a character limit.

    React, Components · Oct 13, 2021

  • Tip: React conditional className, empty strings and null

    When developing React components, you might often need to conditionally apply a className. Learn how to handle empty classNames correctly using this handy tip.

    React, Components · Nov 7, 2021

  • Data list

    Renders a list of elements from an array of primitives.

    React, Components · Nov 3, 2020

  • Tooltip

    Renders a tooltip component.

    React, Components · Nov 16, 2020

  • How can I set the value of a select input in React?

    Learn of all the different ways to set the value of a selected input in React with this quick guide.

    React, Components · Jun 12, 2021

  • Automatic text linking

    Renders a string as plaintext, with URLs converted to appropriate link elements.

    React, Components · Nov 3, 2020

  • Controlled input field

    Renders a controlled <input> element that uses a callback function to inform its parent about value updates.

    React, Components · Nov 3, 2020

  • Uncontrolled range input

    Renders an uncontrolled range input element that uses a callback function to pass its value to the parent component.

    React, Components · Nov 25, 2020

  • Uncontrolled input field

    Renders an uncontrolled <input> element that uses a callback function to inform its parent about value updates.

    React, Components · Nov 3, 2020

  • React useUpdate hook

    Forces the component to re-render when called.

    React, Components · Sep 24, 2021

  • Collapsible content

    Renders a component with collapsible content.

    React, Components · Oct 13, 2021

  • Data table

    Renders a table with rows dynamically created from an array of primitives.

    React, Components · Nov 3, 2020