Renders a hierarchical list as a tree.
A good use case for this component is a folder structure. For navigation and other menus, a regular nested list should be preferred.
<.tree label="Dogs"> <tree_item> Breeds <:items> <.tree_item>Golden Retriever</.tree_item> <.tree_item>Labrador Retriever</.tree_item> </:items> </.tree_item> <.tree_item> Characteristics <:items> <.tree_item>Playful</.tree_item> <.tree_item>Loyal</.tree_item> </:items> </.tree_item> </.tree>
You can target the wrapper with an attribute selector for the role:
[role="tree"] {}