SideLabel
Storybook
Go to StorySideLabelProps
type SideLabelProps = Omit<ComponentProps<"label">, "label"> & object;
Defined in: src/components/SideLabel/SideLabel.tsx:12
Type Declaration
| Name | Type | Description | Defined in |
|---|---|---|---|
label? | ReactNode | Element that describes form input | src/components/SideLabel/SideLabel.tsx:16 |
reverse? | boolean | Show label on right side. | src/components/SideLabel/SideLabel.tsx:20 |
center? | boolean | Center content vertically. Useful to disable centering if the label is complex and spans multiple lines. Default true | src/components/SideLabel/SideLabel.tsx:26 |
SideLabel()
function SideLabel(__namedParameters): Element;
Defined in: src/components/SideLabel/SideLabel.tsx:40
Component for creating labeled form controls like radio, checkbox or switch.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | SideLabelProps |
Returns
Element
Example
// Basic usage with Checkbox
<SideLabel label="Enable notifications">
<Checkbox />
</SideLabel>