Skip to main content
PROYECTOVIVIANA

Checkbox

The props declared for Checkbox, generated from the types @proyecto-viviana/ui ships.

Import

import { Checkbox } from "@proyecto-viviana/ui";

Props

Props for Checkbox in @proyecto-viviana/ui
PropTypeDefaultDescription
size'S' | 'M' | 'L' | 'XL' | 'sm' | 'md' | 'lg'—The size of the checkbox.
isEmphasizedfalse | true—Whether the checkbox should be displayed with an emphasized style.
stylesStyleString—Spectrum-defined generated classes.
UNSAFE_classNamestring—Additional CSS class name. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles. Use only as a last resort.
classstring—Additional CSS class name.
childrennumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—Label text for the checkbox.
descriptionnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—A description for the checkbox, displayed below the label.
errorMessagenumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—An error message for the checkbox, displayed when invalid.
slotstring—Slot name when used in a Spectrum context.
refHTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; }—Ref for the underlying field (root `<div>`) element.
inputRefHTMLInputElement | ((el: HTMLInputElement) => void) | { current?: HTMLInputElement | null | undefined; }—Ref for the underlying input element.
idstring—The element's unique identifier. solidaria
onBlur(e: FocusEvent) => void—Handler that is called when the element loses focus. solidaria
onChange(isSelected: boolean) => void—Handler that is called when the element's selection state changes. solidaria
onClick(e: MouseEvent) => void—Handler that is called when the element is clicked. solidaria
onFocus(e: FocusEvent) => void—Handler that is called when the element receives focus. solidaria
onKeyDown(e: KeyboardEvent) => void—Handler that is called when a key is pressed. solidaria
onKeyUp(e: KeyboardEvent) => void—Handler that is called when a key is released. solidaria
aria-controlsstring—Identifies the element (or elements) whose contents or presence are controlled by the current element. solidaria
aria-describedbystring—Identifies the element (or elements) that describes the object. solidaria
aria-errormessagestring—Identifies the element (or elements) that provide an error message for the object. solidaria
aria-labelstring—Defines a string value that labels the current element. solidaria
aria-labelledbystring—Identifies the element (or elements) that labels the current element. solidaria
isDisabledfalse | true—Whether the element is disabled. solidaria
onPress(e: PressEvent) => void—Handler that is called when the press is released over the target. solidaria
onPressStart(e: PressEvent) => void—Handler that is called when a press interaction starts. solidaria
onPressEnd(e: PressEvent) => void—Handler that is called when a press interaction ends, either over the target or when the pointer leaves the target. solidaria
onPressUp(e: PressEvent) => void—Handler that is called when a press is released over the target, regardless of whether it started on the target or not. solidaria
onPressChange(isPressed: boolean) => void—Handler that is called when the press state changes. solidaria
autoFocusfalse | true—Whether to autofocus the element. solidaria
formstring—The form to associate the input with. solidaria
namestring—The name of the input element, used when submitting an HTML form. solidaria
valuestring—The value of the input element, used when submitting an HTML form. solidaria
excludeFromTabOrderfalse | true—Whether to exclude the element from the tab order. solidaria
onFocusChange(isFocused: boolean) => void—Handler that is called when the element's focus status changes. solidaria
isSelectedfalse | true—Whether the element should be selected (controlled). solidaria
defaultSelectedfalse | true—Whether the element should be selected by default (uncontrolled). solidaria
isReadOnlyfalse | true—Whether the element is read only. solidaria
isInvalidfalse | true—Whether the element is invalid. solidaria
isRequiredfalse | true—Whether the checkbox is required. solidaria
validationBehavior'aria' | 'native''native'The validation behavior for the checkbox. solidaria
validateValidationFunction<boolean>—Custom validation for the toggle's selected state. solidaria
isIndeterminatefalse | true—Whether the checkbox is indeterminate. solidaria-components

Declared in packages/viviana-ui/src/checkbox/index.tsx.

CheckboxGroup props

Props for CheckboxGroup in @proyecto-viviana/ui
PropTypeDefaultDescription
size'S' | 'M' | 'L' | 'XL' | 'sm' | 'md' | 'lg'—The size of the Checkboxes in the CheckboxGroup.
orientation'horizontal' | 'vertical'—The axis the checkboxes should align with.
labelPosition'top' | 'side'—The label's overall position relative to the checkbox items.
labelAlign'start' | 'end'—The label's horizontal alignment relative to the checkbox items.
necessityIndicator'label' | 'icon'—Whether the required state should be shown as an icon or text label.
contextualHelpnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—A contextual help element to place next to the label.
isEmphasizedfalse | true—Whether the Checkboxes should be displayed with an emphasized style.
stylesStyleString—Spectrum-defined generated classes.
UNSAFE_classNamestring—Additional CSS class name. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles. Use only as a last resort.
classstring—Backward-compatible class alias. Prefer UNSAFE_className for S2 parity.
childrennumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—Children checkboxes.
labelnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—Label for the group.
descriptionnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—Description for the group.
errorMessagenumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—Error message when invalid.
slotstring—Slot name when used in a Spectrum context.
refHTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; }—Ref for the checkbox group root element.
onBlur(e: FocusEvent) => void—Handler that is called when the checkbox group loses focus. solid-stately
onChange(value: string[]) => void—Handler that is called when the value changes. solid-stately
onFocus(e: FocusEvent) => void—Handler that is called when the checkbox group receives focus. solid-stately
aria-describedbystring—Identifies the element (or elements) that describes the object. solidaria
aria-detailsstring—Identifies the element (or elements) that provide a detailed, extended description for the object. solidaria
aria-labelstring—Defines a string value that labels the current element. solidaria
aria-labelledbystring—Identifies the element (or elements) that labels the current element. solidaria
isDisabledfalse | true—Whether the checkbox group is disabled. solid-stately
formstring—The form to associate the checkbox group with. solid-stately
namestring—The name of the checkbox group, used when submitting an HTML form. solid-stately
valuestring[]—The current selected values (controlled). solid-stately
onFocusChange(isFocused: boolean) => void—Handler that is called when the checkbox group's focus status changes. solid-stately
validationState'valid' | 'invalid'—Backward-compatible controlled validation state. solid-stately
defaultValuestring[]—The default selected values (uncontrolled). solid-stately
isReadOnlyfalse | true—Whether the checkbox group is read only. solid-stately
isInvalidfalse | true—Whether the checkbox group is invalid. solid-stately
isRequiredfalse | true—Whether the checkbox group is required. solid-stately
validationBehavior'aria' | 'native'—Validation behavior for the checkbox group. solid-stately
validateValidationFunction<readonly string[]>—Custom validation function. solid-stately
renderHelpTextfalse | truetrueWhether this component renders its own description/error-message elements. A styled layer (e.g. solid-spectrum) that renders its own HelpText via a `<Text slot>` sets this to `false`: the wiring stays here — the single source of truth that mints the description/error ids and threads them onto the group and every item's `aria-describedby` — while the visible node is owned by the styled layer. Mirrors RAC, where the group provides a `TextContext` slot and never renders its own description node. solidaria-components

Declared in packages/viviana-ui/src/checkbox/index.tsx.

Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.