Skip to main content
Glama
deleonio
by deleonio
objectValue.tsx1.11 kB
import type { FC } from 'react'; import React from 'react'; import { KolForm, KolInputRadio } from '@public-ui/react-v19'; import { SampleDescription } from '../SampleDescription'; export const InputRadioObjectValue: FC = () => { const options = [ { label: 'Field 1', value: { id: 1, name: 'Option 1' } }, { label: 'Field 2', value: { id: 2, name: 'Option 2' } }, ]; return ( <div className="grid gap-4"> <SampleDescription> This sample shows KolInputRadio with <code>object</code> and <code>undefined</code> values. </SampleDescription> <KolForm> <p> In this example for <code>KolInputRadio</code>, the values of the options are defined as objects. </p> <div className="container my-4 d-grid gap-4"> <KolInputRadio _value={options[1].value} _options={options} _label="Test (with object value)" /> </div> <p> In this example for <code>KolInputRadio</code>, no value is set. </p> <div className="container my-4 d-grid gap-4"> <KolInputRadio _options={options} _label="Test (without value)" /> </div> </KolForm> </div> ); };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/deleonio/public-ui-kolibri'

If you have feedback or need assistance with the MCP directory API, please join our Discord server