OctantisWeb.Components.Polaris.Checkbox (octantis v0.1.12)
View SourceSkeleton display text is used to provide a low fidelity representation of content before it appears on the page, and improves load times perceived by merchants. Can be used for content in or outside of a card.
Examples
<.checkbox id="checkbox-default-default" label="Checkbox label" name="checkbox"/>
See
Summary
Functions
Skeleton display text is used to provide a low fidelity representation of content before it appears on the page, and improves load times perceived by merchants. Can be used for content in or outside of a card.
Functions
Skeleton display text is used to provide a low fidelity representation of content before it appears on the page, and improves load times perceived by merchants. Can be used for content in or outside of a card.
Examples
<.checkbox id="checkbox-default-default" label="Checkbox label" name="checkbox"/>
See
- https://polaris.shopify.com/components/selection-and-input/checkbox
- https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Checkbox/Checkbox.tsx
Attributes
aria_controls
(:string
) - Indicates the ID of the element that is controlled by the checkbox. Defaults tonil
.aria_described_by
(:string
) - Indicates the ID of the element that describes the checkbox. Defaults tonil
.label
(:string
) (required) - Label for the checkbox.label_hidden
(:boolean
) - Visually hide the label. Defaults tofalse
.checked
(:boolean
) - Checkbox is selected.indeterminate
shows a horizontal line in the checkbox. Defaults tofalse
.disabled
(:boolean
) - Disable input. Defaults tofalse
.id
(:string
) - ID for form input.name
(:string
) (required) - Name for form input.phx_click
(:any
) - onClick: Callback when checkbox is clicked.phx_change
(:any
) - onChange: Callback when checkbox is toggled.label_class
(:string
) - Added to the wrapping label.fill
(:list
) - Grow to fill the space. Equivalent to width: 100%; height: 100%.help_text
(:string
) - Additional text to aide in use.error
(:string
) - Display an error message.tone
(:string
) - Indicates the tone of the checkbox.Must be one of"magic"
.phx_values
(:list
) - A list of key value pairs to be passed as a value for actions. See assign_phx_bindings/2. Defaults to[]
.- Global attributes are accepted.