RadioCard
Use the RadioCard component when you want to offer a few options for the user to choose from (ideally 3 or 4), and they can only choose one. The RadioCard comes with a description and can be extended with icons and other elements. The RadioCard can come in handy when displaying different plans or upselling opportunities.
#Usage
import { RadioCard } from '@kinsta/stratus'
const MyComponent = () => (
<RadioCard isChecked>
<RadioCard.Content title="Radio Card component" text="Radio Card component" />
</RadioCard>
)
#Props
The RadioCard
components interface extends the
HTMLInputElement
interface. So you can use any props which documented there. Also, you can utilize all the React Synthetic events (on*
),
and props related to styling (className
, style
).
#RadioCard.Content Props
The Content
component provides basic styles that render the default layout and look of the RadioCard
.
Use the Content
component if you want to display the basic design.
#Types
RadioCardProps
: props of theRadioCard
component processed by stratusRadioCardInterface
:RadioCardProps
extended byHTMLAttributes<HTML….>
RadioCardComponent
:RadioCardInterface
extended byForwardRefExoticComponent
type, and it also includes theRadioCard.Content
subcomponent's type:
type RadioCardComponent = ForwardRefExoticComponent<
RadioCardInterface & RefAttributes<HTMLInputElement>
> & {
Content: (props: RadioCardContentProps) => JSX.Element
}
Read more about types here