Skip to content

feat(elements): details#22

Merged
petermasking merged 3 commits intomainfrom
20-add-collapse-item-support
Feb 19, 2026
Merged

feat(elements): details#22
petermasking merged 3 commits intomainfrom
20-add-collapse-item-support

Conversation

@basmasking
Copy link
Member

@basmasking basmasking commented Feb 19, 2026

Fixes #20

Changes proposed in this pull request:

  • added details element
  • typo in docs

@basmasking basmasking linked an issue Feb 19, 2026 that may be closed by this pull request
docs/ELEMENTS.md Outdated
* **Layout:** `Grid`, `Column`, `Row`, `Cell`
* **Text:** `Title`, `Paragraph`, `Text`, `List`
* **Interaction:** `Button`, `Clickarea`, `Link`
* **Interaction:** `Button`, `ClickArea`, `Collapsible`, `Link`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Food for thought: its role is more a container than an interaction element?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that's more like a container

docs/ELEMENTS.md Outdated
- `--padding-medium` (default: `var(--input-padding-medium)`)
- `--padding-large` (default: `var(--input-padding-large)`)

### Collapsible
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Food for thought: since its is a wrapper of the HTML details element, renaming the element to Details would align with web standards.

docs/ELEMENTS.md Outdated

A widget that can expand and collapse its content.

Properties:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Food for thought: should we add an option to stet the open state?

Example use-case: routing to details.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid scenario, prop added. Also added a prop for name, so the details can be grouped together.

{
.collapsible
{
--padding-small: var(--container-padding-small) 0 0 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--padding-small: var(--container-padding-small) 0 0 0;
--padding: var(--container-padding-small) 0 0 0;

Since there's only one padding, it's nor small, medium or large.

@basmasking basmasking changed the title feat(elements): collapsible feat(elements): details Feb 19, 2026
.details
{
--padding: var(--container-padding-small) 0 0 0;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
summary
{
cursor: pointer;
}

Currently, everything clickable has a pointer indicator. It feels logical to add it here too.

@petermasking petermasking merged commit 32bf7ec into main Feb 19, 2026
5 checks passed
@petermasking petermasking deleted the 20-add-collapse-item-support branch February 19, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add collapse item support

2 participants