Pack Documentation
  • Welcome to the Pack!
  • Guides
    • Getting started
    • Creating your first Storefront
    • Previewing your Storefront
    • Editing your Storefront
    • Scheduling Content
    • Start developing
  • Fundamentals
    • Organization
    • Storefronts
    • Customizer
  • For Merchants
    • Creating Organizations
    • Creating Storefronts
    • Deploys
    • Product Bundles
    • Product Groupings
    • Inviting Teammates
    • Redirects
    • Editing Storefront Settings
  • For Marketers
    • Creating Pages
    • Sections
    • Publishing/Unpublishing
    • Managing Media
  • For Developers
    • Storefront Hooks
      • Settings Hooks
      • Page Hooks
      • Product Hooks
      • Collection Hooks
      • Blog Hooks
      • Article Hooks
    • Section API
      • Schema
      • Fields
        • Text
        • Color
        • Text Area
        • Markdown
        • Image
        • Number
        • Link
        • Product
        • Product Bundle
        • HTML
        • Group
        • List
        • Group List
        • Toggle
        • Select
        • Radio Group
        • Tags
    • Creating Storefront Settings
    • Shopify Hooks
      • Cart
        • useCart
        • useCartClear
        • useCartCheckout
        • useCartUpdateNote
        • useCartAddItems
        • useCartUpdateItems
        • useCartRemoveItems
        • useCartAddAttributes
        • useCartUpdateAttributes
        • useCartRemoveAttributes
        • useCartAddDiscount
        • useCartRemoveDiscount
        • useCartAddGiftCard
        • useCartRemoveGiftCard
      • Customer
        • useCustomer
        • useCustomerCreate
        • useCustomerLogin
        • useCustomerLogout
        • useCustomerCreateAddress
        • useCustomerUpdateAddress
        • useCustomerDeleteAddress
        • useCustomerUpdateDetails
        • useCustomerRecoverPassword
        • useCustomerResetPassword
      • Hydrogen Framework
    • Asynchronous Hooks
    • Pack API
      • Queries
    • Transform Specification
    • Adding Tailwind CSS
Powered by GitBook
On this page
  1. For Developers
  2. Section API
  3. Fields

Radio Group

This is a field of radio inputs. Returns the value of your selected option. This field also has the option to be displayed vertically or horizontally, or as radios or buttons.

Radio Group Field
{
  component: 'radio-group',
  name: 'radioName',
  label: 'Radio Group Field',
  description: 'A radio field',
  options: [
    {
      label: 'Yes',
      value: 'yesValue'
    },
    {
      label: 'Maybe',
      value: 'maybeValue'
    },
    {
      label: 'No',
      value: 'noValue'
    },
  ],
  defaultValue: 'maybeValue',
}

Key

Type

Required

Description

component

string

yes

The name of the field component. (radio-group)

name

string

yes

The name of the field that will be accessible by the cms prop of the component.

label

string

no

A human-readable label for the field.

description

no

no

A short description of the setting scope.

options

Array<Option>

no

An array of objects your radio options. The object has a label key and value key.

defaultValue

string

no

This will be a value of your radio values.

variant

"radio" | "button"

no

Will display your radio group as a button or radio input.

direction

"horizontal" | "vertical"

no

Tells buttons to stack vertically or horizontally.

PreviousSelectNextTags

Last updated 2 years ago