@carbon/react
Version:
React components for the Carbon Design System
74 lines (73 loc) • 2.48 kB
TypeScript
/**
* Copyright IBM Corp. 2016, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
export interface RadioTileProps {
/**
* Specify whether the `RadioTile` should be checked.
*/
checked?: boolean;
/**
* The `RadioTile` content.
*/
children?: React.ReactNode;
/**
* Provide an optional `className` to be applied to the underlying `<label>`.
*/
className?: string;
/**
* **Experimental**: Provide a `decorator` component to be rendered inside the `RadioTile` component
*/
decorator?: React.ReactNode;
/**
* Specify whether the `RadioTile` should be disabled.
*/
disabled?: boolean;
/**
* **Experimental**: Specify if the `ExpandableTile` component should be rendered with rounded corners.
* Only valid when `slug` prop is present
*/
hasRoundedCorners?: boolean;
/**
* Provide a unique id for the underlying `<input>`.
*/
id?: string;
/**
* `true` to use the light version. For use on `$layer-01` backgrounds only.
* Don't use this to make tile background color the same as the container background color.
*
* @deprecated This prop is no longer needed and has been deprecated in v11 in favor of the new Layer component. It will be removed in the next major release.
*/
light?: boolean;
/**
* Provide a `name` for the underlying `<input>`.
*/
name?: string;
/**
* Provide an optional `onChange` hook that is called each time the value of
* the underlying `<input>` changes.
*/
onChange?: (value: string | number, name: string | undefined, event: React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent<HTMLInputElement>) => void;
/**
* @deprecated please use `decorator` instead.
* **Experimental**: Provide a `Slug` component to be rendered inside the `RadioTile` component
*/
slug?: React.ReactNode;
/**
* Specify the tab index of the underlying `<input>`.
*/
tabIndex?: number;
/**
* Specify the value of the underlying `<input>`.
*/
value: string | number;
/**
* `true` to specify if the input is required.
*/
required?: boolean;
}
declare const RadioTile: React.ForwardRefExoticComponent<RadioTileProps & React.RefAttributes<HTMLInputElement>>;
export default RadioTile;