HackGT / fluo

🎐 just another web-component library, brought to you by ninjas
MIT License
6 stars 0 forks source link

Detail #20

Closed 1ntEgr8 closed 3 years ago

1ntEgr8 commented 3 years ago

Overview

Analogue to the HTML <details> element. Also known as accordion in many libraries.

Use Cases

Useful for displaying summaries of information, and providing the user the ability to see more details by toggling the component.

Prior Art/Examples


Note: The following section is optional for making the issue, but must be filled in for a possible PR to be merged

API

Component name:

Attributes: Property Description Type Default
open Opens the component if set to true boolean false
disabled Disables the component boolean false
summary Can be used to set a pure text summary. If you need to use HTML, use the summary slot string undefined
Slots: Slot Description
summary A slot to display the summary of an element. Use if you want to display HTML in the summary.

CSS Parts:

Example usage

Provide a short snippet of code showing how your component could potentially be used

<fl-details summary="Summary title goes here">
    More info woo!!
</fl-details>

<fl-details>
    <h1 slot="summary">i go in the summary slot</h1>
    More info in here!
</fl-details>

Questions to be answered