Skip to content

Commit 67a30f9

Browse files
naivefunclaude
andcommitted
Add CSS customization documentation
- Document all available CSS classes for user overrides - Explain CSS variables for styling customization - Provide examples of common style modifications - Better user experience for theme integration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent ba25a5f commit 67a30f9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,45 @@ Explore interactive examples and see handtree in action:
152152
- **Interactive JSON Schema Explorer** - Complex nested data with custom styling, expand/collapse state management, and rich details content. Perfect example of handling heterogeneous data structures that resist normalization.
153153
- **Minimal Example** - Lightweight implementation showing the essential patterns
154154

155+
## Customizing Styles
156+
157+
handtree uses prefixed CSS classes that you can easily override:
158+
159+
```css
160+
/* Customize tree lines color */
161+
.handtree-root {
162+
--outline-color: #0066cc;
163+
}
164+
165+
/* Style the expand/collapse icons */
166+
.handtree-head {
167+
color: #666;
168+
}
169+
.handtree-head:hover {
170+
color: #0066cc;
171+
}
172+
173+
/* Customize spacing */
174+
.handtree-root {
175+
--indent-width: 32px;
176+
--head-width: 30px;
177+
}
178+
```
179+
180+
**Available CSS classes:**
181+
- `.handtree-root` - Root container
182+
- `.handtree-node` - Individual node wrapper
183+
- `.handtree-head` - Expand/collapse area
184+
- `.handtree-title` - Title content area
185+
- `.handtree-details` - Details content area
186+
- `.handtree-content` - Main content wrapper
187+
- `.handtree-indent` - Indentation guides
188+
189+
**CSS Variables:**
190+
- `--outline-color` - Tree connecting lines color
191+
- `--indent-width` - Indentation per level
192+
- `--head-width` - Width of expand/collapse area
193+
155194
## Development
156195

157196
```bash

0 commit comments

Comments
 (0)