Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@radix-ui/react-collapsible

Package Overview
Dependencies
Maintainers
8
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-collapsible

  • 0.1.1-rc.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9M
increased by2.44%
Maintainers
8
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 29 Sep 2021

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc