logoAnt Design

⌘ K
  • 디자인
  • 개발
  • 컴포넌트
  • 블로그
  • 자료
5.21.3
  • Components Overview
  • General
    • Button
    • FloatButton
      5.0.0
    • Icon
    • Typography
  • Layout
    • Divider
    • Flex
      5.10.0
    • Grid
    • Layout
    • Space
    • Splitter
      5.21.0
  • Navigation
    • Anchor
    • Breadcrumb
    • Dropdown
    • Menu
    • Pagination
    • Steps
  • Data Entry
    • AutoComplete
    • Cascader
    • Checkbox
    • ColorPicker
      5.5.0
    • DatePicker
    • Form
    • Input
    • InputNumber
    • Mentions
    • Radio
    • Rate
    • Select
    • Slider
    • Switch
    • TimePicker
    • Transfer
    • TreeSelect
    • Upload
  • Data Display
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Collapse
    • Descriptions
    • Empty
    • Image
    • List
    • Popover
    • QRCode
      5.1.0
    • Segmented
    • Statistic
    • Table
    • Tabs
    • Tag
    • Timeline
    • Tooltip
    • Tour
      5.0.0
    • Tree
  • Feedback
    • Alert
    • Drawer
    • Message
    • Modal
    • Notification
    • Popconfirm
    • Progress
    • Result
    • Skeleton
    • Spin
    • Watermark
      5.1.0
  • Other
    • Affix
    • App
      5.1.0
    • ConfigProvider
    • Util
      5.13.0

Splitter

Split panels to isolate
가져오기import{ Splitter }from"antd";
소스components/splitter
문서
이 페이지 수정변경 로그
버전5.21.0 이후 지원됨

Resources

Ant Design Charts
Ant Design Pro
Ant Design Pro Components
Ant Design Mobile
Ant Design Mini
Ant Design Landing-Landing Templates
Scaffolds-Scaffold Market
Umi-React Application Framework
dumi-Component doc generator
qiankun-Micro-Frontends Framework
ahooks-React Hooks Library
Ant Motion-Motion Solution
China Mirror 🇨🇳

Community

Awesome Ant Design
Medium
Twitter
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference
Work with Us

Help

GitHub
Change Log
FAQ
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community
loading

When To Use

Can be used to separate areas horizontally or vertically. When you need to freely drag and adjust the size of each area. When you need to specify the maximum and minimum width and height of an area.

Examples

API

Common props ref:Common props

The Splitter component needs to calculate the panel size through its child elements, so its child elements only support Splitter.Panel.

Splitter

PropertyDescriptionTypeDefaultVersion
layoutLayout directionhorizontal | verticalhorizontal-
onResizeStartCallback before dragging starts(sizes: number[]) => void--
onResizePanel size change callback(sizes: number[]) => void--
onResizeEndDrag end callback(sizes: number[]) => void--

Panel

PropertyDescriptionTypeDefaultVersion
defaultSizeInitial panel size support number for px or 'percent%' usagenumber | string--
minMinimum threshold support number for px or 'percent%' usagenumber | string--
maxMaximum threshold support number for px or 'percent%' usagenumber | string--
sizeControlled panel size support number for px or 'percent%' usagenumber | string--
collapsibleQuick foldingboolean | { start?: boolean; end?: boolean }false-
resizableWhether to enable drag and dropbooleantrue-

Design Token

컴포넌트 토큰어떻게 사용하나요?

토큰 이름설명타입기본값
resizeSpinnerSize可改变大小标识 元素大小number20
splitBarSize拖拽标识元素大小number2
splitTriggerSize拖拽触发区域大小number6

글로벌 토큰어떻게 사용하나요?

Basic
codepen icon
External Link Icon
expand codeexpand code
Control mode
codepen icon
External Link Icon
expand codeexpand code
Vertical
codepen icon
External Link Icon
expand codeexpand code
Collapsible
codepen icon
External Link Icon
expand codeexpand code
Multiple panels
codepen icon
External Link Icon
expand codeexpand code
Complex combination
codepen icon
External Link Icon
expand codeexpand code
Nested in tabs
codepen icon
External Link Icon
expand codeexpand code
Debug
codepen icon
External Link Icon
expand codeexpand code
First
Second
First
Second
First
Second
First
Second
First
Second
Panel 1
Panel 2
Panel 3
Left
Top
Bottom
General
Splitter Tab
Content of Tab Pane 1

[true, 0, false]

Panel 1
Panel 2
Panel 3

[false, 0, true]

Panel 1
Panel 2
Panel 3

Start have min & max

Panel 1
Panel 2

End have min & max

Panel 1
Panel 2