React Components
The React snippet collection contains function components and reusable hooks for React 16.
Renders an accordion menu with multiple collapsible content elements.
Renders an alert component with
type
prop.Renders a string as plaintext, with URLs converted to appropriate link elements.
Renders a carousel component.
Renders a component with collapsible content.
Renders a controlled
<input>
element that uses a callback function to inform its parent about value updates.Renders a countdown timer that prints a message when it reaches zero.
Renders a list of elements from an array of primitives.
Renders a table with rows dynamically created from an array of primitives.
Renders a file drag and drop component for a single file.
Learn of all the different ways to set the value of a selected input in React with this quick guide.
Renders a textarea component with a character limit.
Renders a textarea component with a word limit.
Renders a spinning loader component.
Renders a link formatted to send an email (
mailto:
link).