Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Component]: TreeView #10

Open
junwen-k opened this issue Nov 18, 2024 · 0 comments
Open

[New Component]: TreeView #10

junwen-k opened this issue Nov 18, 2024 · 0 comments
Labels
api-design API needs more thorough consideration enhancement New feature or request

Comments

@junwen-k
Copy link
Owner

TreeView

TreeView lets users navigate hierarchical lists of data with nested levels that can be expanded and collapsed.

Visual References

image

Description

We can build a tree view with nested Accordion. We could have props like:

value
defaultValue
onValueChange

checked
defaultChecked
onCheckedChange

The value would either be "string" | "string[]" depending on the type "single" | "multiple". We could also potentially support 2 different types for checked and collapsible state, e.g having single for checked state and multiple for collapsible state.

Not sure if we ever need to support editing / sorting like MUI-X does, it should be achieved by composition if possible, though.

Anatomy

<TreeView.Root>
    <TreeView.Item>
        <TreeView.Item />
    </TreeView.Item>
    <TreeView.Checkbox>
        <TreeView.Checkbox />
    </TreeView.Checkbox>
</TreeView.Root>

Libraries / Hooks

@junwen-k junwen-k added enhancement New feature or request api-design API needs more thorough consideration labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-design API needs more thorough consideration enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant