Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@gluestack-ui/accordion
Advanced tools
A universal headless accordion component for React Native, Next.js & React
@gluestack-ui/accordion
The Accordion component is a versatile and interactive user interface element, designed to efficiently organize and present content in a compact space.
To install the component, run the following command in your terminal. This will add the component to your project's dependencies and allow you to use it in your project.
npx install @gluestack-ui/accordion
// import the styles
import {
Root,
Item,
Header,
Trigger,
Content,
Icon,
TitleText,
ContentText,
} from '../components/core/accordion/styled-components';
// import the createAccordion function
import { createAccordion } from '@gluestack-ui/accordion';
// Understanding the API
const Accordion = createAccordion({
Root,
Item,
Header,
Trigger,
Content,
Icon,
TitleText,
ContentText,
});
// Using the Accordion component
export default () => (
<Accordion>
<AccordionItem value="a">
<AccordionHeader>
<AccordionTrigger>
{({ isExpanded }: { isExpanded: boolean }) => {
return (
<>
<AccordionTitleText>
How do I place an order?
</AccordionTitleText>
{isExpanded ? (
// ChevronUpIcon is imported from 'lucide-react-native'
<AccordionIcon as={ChevronUpIcon} />
) : (
// ChevronDownIcon is imported from 'lucide-react-native'
<AccordionIcon as={ChevronDownIcon} />
)}
</>
);
}}
</AccordionTrigger>
</AccordionHeader>
<AccordionContent>
<AccordionContentText>
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
</AccordionContentText>
</AccordionContent>
</AccordionItem>
</Accordion>
);
More guides on how to get started are available here.
FAQs
A universal headless accordion component for React Native, Next.js & React
We found that @gluestack-ui/accordion demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.