fix(ui): standardize scrollable areas (#2399)

This commit is contained in:
Lovehsigure_520
2026-08-29 22:34:24 +08:00
committed by GitHub
parent 484a2b7b19
commit da2ac8bbcc
34 changed files with 1387 additions and 479 deletions
+15
View File
@@ -79,6 +79,21 @@ Responsive screen component that calculates canvas dimensions based on breakpoin
**Props**: None | **Slots**: `default({ width, height })`
### ScrollableArea
Reka UI scroll area with shared light-mode and dark-mode scrollbar styles.
The component forwards HTML attributes to the scroll-area root.
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `contentAsChild` | `boolean?` | `false` | Render the viewport content wrapper through the single default slot child |
| `orientation` | `'vertical' \| 'horizontal' \| 'both'` | `'vertical'` | Scrollbar orientations to render |
| `type` | `ScrollAreaRootProps['type']?` | `'auto'` | Reka UI scrollbar visibility behavior |
| `viewportClass` | `string \| string[]?` | — | Classes for the Reka UI viewport |
**Slots**: `default`
**Exposed**: `viewport` (the native scroll owner. Reka UI hides its native scrollbar and renders the configured custom track.)
### Skeleton
Loading placeholder with animation.