--- order: 1 title: zh-CN: 自定义渲染 en-US: Custom Render --- ## zh-CN 使用 ReactNode 自定义渲染每一个 Segmented Item。 ## en-US Custom each Segmented Item by ReactNode. ```jsx import { Avatar, Segmented } from 'antd'; import { UserOutlined } from '@ant-design/icons'; export default () => ( <>
User 1
), value: 'user1', }, { label: ( <> K
User 2
), value: 'user2', }, { label: ( <> } />
User 3
), value: 'user3', }, ]} />
Spring
Jan-Mar
), value: 'spring', }, { label: ( <>
Summer
Apr-Jun
), value: 'summer', }, { label: ( <>
Autumn
Jul-Sept
), value: 'autumn', }, { label: ( <>
Winter
Oct-Dec
), value: 'winter', }, ]} /> ); ```