---
title: "Comment by Rikard on \"How to Build Accordion In React From Scratch Without Using Any External Library\" | Hashnode"
description: "Nice! Just a quick reminder using native HTML elements is the easiest way to create an accessible accordion – no JS required! &lt;details&gt; &lt; summary &gt;"
url: "https://hashnode.com/posts/how-to-build-accordion-in-react-from-scratch-without-using-any-external-library/60518c2f416f221f065b772b/comment/605d14f3965326422a3efd3c"
---

[Discussion](https://hashnode.com/posts/how-to-build-accordion-in-react-from-scratch-without-using-any-external-library/60518c2f416f221f065b772b)

Comment [How to Build Accordion In React From Scratch Without Using Any External Library](https://hashnode.com/posts/how-to-build-accordion-in-react-from-scratch-without-using-any-external-library/60518c2f416f221f065b772b)

[Rikard](https://hashnode.com/@rix1)

[Mar 25, 2021](https://hashnode.com/posts/how-to-build-accordion-in-react-from-scratch-without-using-any-external-library/60518c2f416f221f065b772b/comment/605d14f3965326422a3efd3c)

Nice! Just a quick reminder using native HTML elements is the easiest way to create an accessible accordion – no JS required!

```
<details>
<summary>Section 1</summary>
Hello this is my section. 
</details>
```

Example of the above code (**edit**: Hashnode doesn't seem to use the same renderer for "preview" and after posting, so I had to take a screenshot of it)

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1616713038455/T43ton9v_.png)

See this for more details: [css-tricks.com/quick-reminder-that-details-summar…](https://css-tricks.com/quick-reminder-that-details-summary-is-the-easiest-way-ever-to-make-an-accordion/)

[Yogesh Chavan](https://hashnode.com/@myogeshchavan97)

[Mar 26, 2021](https://hashnode.com/posts/how-to-build-accordion-in-react-from-scratch-without-using-any-external-library/60518c2f416f221f065b772b/comment/605d14f3965326422a3efd3c#reply-605d6f2efc7d47424f0cbd6f)

This is so cool. I was not aware of this. Thank you 🙂
