logoNamu Design

⌘ K
  • Design
  • Development
  • Components
  • Blog
  • Resources
1.0.0
  • Components Overview
  • General
    • Button
    • FloatButtonNew
    • Icon
    • Typography
  • Layout
    • Divider
    • Grid
    • Layout
    • Space
  • Navigation
    • Anchor
    • Breadcrumb
    • Dropdown
    • Menu
    • Pagination
    • Steps
  • Data Entry
    • AutoComplete
    • Cascader
    • Checkbox
    • ColorPickerNew
    • 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
    • QRCodeNew
    • Segmented
    • Statistic
    • Table
    • Tabs
    • Tag
    • Timeline
    • Tooltip
    • TourNew
    • Tree
  • Feedback
    • Alert
    • Drawer
    • Message
    • Modal
    • Notification
    • Popconfirm
    • Progress
    • Result
    • Skeleton
    • Spin
    • Watermark
  • Other
    • Affix
    • AppNew
    • ConfigProvider
When To Use
Examples
Basic
disabled
Radio Group
Vertical Radio.Group
Radio.Group group - optional
radio style
Radio.Group with name
Size
Solid radio button
API
Radio/Radio.Button
RadioGroup
Methods
Radio
Design Token

Radio

  • MentionsRate

    Resources

    Namu Design Charts
    Namu Design Pro
    Namu Design Pro Components
    Namu Design Mobile
    Namu Design Mini
    Namu 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 Namu Design
    Medium
    Twitter
    yuqueNamu Design in YuQue
    Namu Design in Zhihu
    Experience Cloud Blog
    seeconfSEE Conf-Experience Tech Conference

    Help

    GitHub
    Change Log
    FAQ
    Bug Report
    Issues
    Discussions
    StackOverflow
    SegmentFault

    Ant XTechMore Products

    yuqueYuQue-Document Collaboration Platform
    AntVAntV-Data Visualization
    EggEgg-Enterprise Node.js Framework
    kitchenKitchen-Sketch Toolkit
    xtechAnt Financial Experience Tech
    Theme Editor
    Made with ❤ by
    Ant Group and Namu Design Community

    Radio.

    When To Use

    • Used to select a single state from multiple options.
    • The difference from Select is that Radio is visible to the user and can facilitate the comparison of choice, which means there shouldn't be too many of them.

    Examples

    Basic

    The simplest use.

    expand codeexpand code
    Radio Group

    A group of radio components.

    expand codeexpand code
    Radio.Group group - optional

    Render radios by configuring options. Radio type can also be set through the optionType parameter.

    expand codeexpand code
    Radio.Group with name

    Passing the name property to all input[type="radio"] that are in the same Radio.Group. It is usually used to let the browser see your Radio.Group as a real "group" and keep the default behavior. For example, using left/right keyboard arrow to change your selection that in the same Radio.Group.

    expand codeexpand code
    Solid radio button

    Solid radio button style.

    expand codeexpand code
    disabled

    Radio unavailable.

    expand codeexpand code
    Vertical Radio.Group

    Vertical Radio.Group, with more radios.

    expand codeexpand code
    radio style

    The combination of radio button style.

    expand codeexpand code
    Size

    There are three sizes available: large, medium, and small. It can coordinate with input box.

    expand codeexpand code

    API

    Common props ref:Common props

    Radio/Radio.Button

    PropertyDescriptionTypeDefault
    autoFocusWhether get focus when component mountedbooleanfalse
    checkedSpecifies whether the radio is selectedbooleanfalse
    defaultCheckedSpecifies the initial state: whether or not the radio is selectedbooleanfalse
    disabledDisable radiobooleanfalse
    valueAccording to value for comparison, to determine whether the selectedany-

    RadioGroup

    Radio group can wrap a group of Radio。

    PropertyDescriptionTypeDefaultVersion
    buttonStyleThe style type of radio buttonoutline | solidoutline
    defaultValueDefault selected valueany-
    disabledDisable all radio buttonsbooleanfalse
    nameThe name property of all input[type="radio"] childrenstring-
    optionsSet children optionalstring[] | number[] | Array<{ label: ReactNode; value: string; disabled?: boolean; }>-
    optionTypeSet Radio optionTypedefault | buttondefault4.4.0
    sizeThe size of radio button stylelarge | middle | small-
    valueUsed for setting the currently selected valueany-
    onChangeThe callback function that is triggered when the state changesfunction(e:Event)-

    Methods

    Radio

    NameDescription
    blur()Remove focus
    focus()Get focus

    Design Token

    Component Token

    Global Token