Socket
Socket
Sign inDemoInstall

@radix-ui/react-collapsible

Package Overview
Dependencies
Maintainers
6
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-collapsible


Version published
Maintainers
6
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 19 Jun 2024

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