Socket
Book a DemoInstallSign in
Socket

@radix-ui/react-collapsible

Package Overview
Dependencies
Maintainers
7
Versions
260
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-collapsible

0.1.6-rc.18
Source
npmnpm
Version published
Weekly downloads
7.9M
-9.45%
Maintainers
7
Weekly downloads
 
Created

What is @radix-ui/react-collapsible?

The @radix-ui/react-collapsible package provides components to create collapsible sections in React applications. It is designed to be accessible and customizable, allowing developers to implement collapsible features easily while maintaining good user experience for all users, including those using assistive technologies.

What are @radix-ui/react-collapsible's main functionalities?

Basic Collapsible Component

This code demonstrates how to create a basic collapsible component using @radix-ui/react-collapsible. It includes a trigger that toggles the visibility of the content.

import * as Collapsible from '@radix-ui/react-collapsible';

function MyComponent() {
  const [open, setOpen] = React.useState(false);

  return (
    <Collapsible.Root open={open} onOpenChange={setOpen}>
      <Collapsible.Trigger>Toggle</Collapsible.Trigger>
      <Collapsible.Content>
        Content inside the collapsible section.
      </Collapsible.Content>
    </Collapsible.Root>
  );
}

Other packages similar to @radix-ui/react-collapsible

FAQs

Package last updated on 17 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.