UNPKG

@ownclouders/design-system

Version:

ownCloud Design System is based on VueDesign Systems and is used to design ownCloud UI components

39 lines (38 loc) 1.25 kB
/** * OcSwitch Component * * A toggle switch component that allows users to switch between two states. * * @component * @name OcSwitch * @status ready * @release 1.0.0 * * @props * @prop {boolean} [checked=false] - The current state of the switch (true for on, false for off). * @prop {string} [label=null] - The accessible name of the switch. * @prop {string} [labelId=uniqueId('oc-switch-label-')] - The ID of the label element. If not provided, a unique ID is generated. * * @emits * @event update:checked - Emitted when the switch state changes. * @type {boolean} * * @example * <OcSwitch * :checked="isOn" * label="Enable notifications" * @update:checked="handleToggle" * /> * */ interface Props { checked?: boolean; label?: string; labelId?: string; } declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { "update:checked": (value: boolean) => any; }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{ "onUpdate:checked"?: (value: boolean) => any; }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>; export default _default;