Panel 面板

一个内容面板, 支持折叠面板。Panel 中可以放所有 Data Display 组件,可以作为表单的容器。

获取组件

import { Panel, PanelGroup } from 'rsuite';

// or
import Panel from 'rsuite/Panel';
import PanelGroup from 'rsuite/PanelGroup';

演示

默认

带线框

有阴影

带操作按钮

没有标题

卡片

A suite of React components, sensible UI design, and a friendly development experience.

卡片组

可折叠

撑满容器

Id
Name
City
Email
1
Hal
Beijing
hal@yahoo.com
2
Hal
Beijing
hal@yahoo.com
3
Linda
New Amieshire
linda@hotmail.com
4
Hazel
Eulaliabury
hazel@mail.ru
5
Julia
Ritchieborough
julia@msn.com
6
Bryan
Shanghai
bryan@gmail.com
7
Alice
East Catalina
alice@live.com
8
Linda
New Amieshire
linda@hotmail.com
9
Albert
Gilberthaven
albert@yandex.com
10
Nancy
New Gust
nancy@outlook.com
11
Albert
Gilberthaven
albert@yandex.com
12
Linda
New Amieshire
linda@hotmail.com
13
Lloyd
Lefflerstad
lloyd@aol.com
14
Bryan
Shanghai
bryan@gmail.com
15
Albert
Gilberthaven
albert@yandex.com
16
Linda
New Amieshire
linda@hotmail.com
17
Julia
Ritchieborough
julia@msn.com
18
Alice
East Catalina
alice@live.com
19
Linda
New Amieshire
linda@hotmail.com
20
Lloyd
Lefflerstad
lloyd@aol.com
加载中...

面板组

可折叠面板组

Panel 1

手风琴效果

每次只能展开一个面板

Panel 1

Props

<Panel>

属性名称 类型(默认值) 描述
bodyFill boolean 内容区域撑满容器
bordered boolean 显示线框
shaded boolean 显示阴影
classPrefix string ('panel') 组件 CSS 类的前缀
collapsible boolean 可折叠的
defaultExpanded boolean 默认展开
eventKey string 面板对应的事件 key
expanded boolean 展开面板
header ReactNode 头部显示信息
id string | number ID

<PanelGroup>

属性名称 类型(默认值) 描述
accordion boolean 可折叠的面板
activeKey string 展开的面板,对应 <Panel>eventKey
classPrefix string 组件 CSS 类的前缀
defaultActiveKey string 默认展开面板
onSelect (eventKey: string, event) => void 切换展开面板的回调函数
Vercel banner