• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Provides a button component.
23 *
24 * @enum { number }
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 7
27 */
28/**
29 * Provides a button component.
30 *
31 * @enum { number }
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @form
34 * @since 9
35 */
36/**
37 * Provides a button component.
38 *
39 * @enum { number }
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @crossplatform
42 * @form
43 * @since 10
44 */
45/**
46 * Provides a button component.
47 *
48 * @enum { number }
49 * @syscap SystemCapability.ArkUI.ArkUI.Full
50 * @crossplatform
51 * @form
52 * @atomicservice
53 * @since 11
54 */
55declare enum ButtonType {
56  /**
57   * Capsule button (rounded corners default to half the height).
58   *
59   * @syscap SystemCapability.ArkUI.ArkUI.Full
60   * @since 7
61   */
62  /**
63   * Capsule button (rounded corners default to half the height).
64   *
65   * @syscap SystemCapability.ArkUI.ArkUI.Full
66   * @form
67   * @since 9
68   */
69  /**
70   * Capsule button (rounded corners default to half the height).
71   *
72   * @syscap SystemCapability.ArkUI.ArkUI.Full
73   * @crossplatform
74   * @form
75   * @since 10
76   */
77  /**
78   * Capsule button (rounded corners default to half the height).
79   *
80   * @syscap SystemCapability.ArkUI.ArkUI.Full
81   * @crossplatform
82   * @form
83   * @atomicservice
84   * @since 11
85   */
86  Capsule,
87
88  /**
89   * Round buttons.
90   *
91   * @syscap SystemCapability.ArkUI.ArkUI.Full
92   * @since 7
93   */
94  /**
95   * Round buttons.
96   *
97   * @syscap SystemCapability.ArkUI.ArkUI.Full
98   * @form
99   * @since 9
100   */
101  /**
102   * Round buttons.
103   *
104   * @syscap SystemCapability.ArkUI.ArkUI.Full
105   * @crossplatform
106   * @form
107   * @since 10
108   */
109  /**
110   * Round buttons.
111   *
112   * @syscap SystemCapability.ArkUI.ArkUI.Full
113   * @crossplatform
114   * @form
115   * @atomicservice
116   * @since 11
117   */
118  Circle,
119
120  /**
121   * Common button (no rounded corners by default).
122   *
123   * @syscap SystemCapability.ArkUI.ArkUI.Full
124   * @since 7
125   */
126  /**
127   * Common button (no rounded corners by default).
128   *
129   * @syscap SystemCapability.ArkUI.ArkUI.Full
130   * @form
131   * @since 9
132   */
133  /**
134   * Common button (no rounded corners by default).
135   *
136   * @syscap SystemCapability.ArkUI.ArkUI.Full
137   * @crossplatform
138   * @form
139   * @since 10
140   */
141  /**
142   * Common button (no rounded corners by default).
143   *
144   * @syscap SystemCapability.ArkUI.ArkUI.Full
145   * @crossplatform
146   * @form
147   * @atomicservice
148   * @since 11
149   */
150  Normal,
151
152  /**
153   * Rounded rectangle button.
154   *
155   * @syscap SystemCapability.ArkUI.ArkUI.Full
156   * @crossplatform
157   * @form
158   * @atomicservice
159   * @since 15
160   */
161  ROUNDED_RECTANGLE = 3,
162}
163
164/**
165 * Enum for button style type.
166 *
167 * @enum { number }
168 * @syscap SystemCapability.ArkUI.ArkUI.Full
169 * @crossplatform
170 * @form
171 * @since 11
172 */
173/**
174 * Enum for button style type.
175 *
176 * @enum { number }
177 * @syscap SystemCapability.ArkUI.ArkUI.Full
178 * @crossplatform
179 * @form
180 * @atomicservice
181 * @since 12
182 */
183declare enum ButtonStyleMode {
184  /**
185   * Normal button (with normal background color).
186   *
187   * @syscap SystemCapability.ArkUI.ArkUI.Full
188   * @crossplatform
189   * @form
190   * @since 11
191   */
192  /**
193   * Normal button (with normal background color).
194   *
195   * @syscap SystemCapability.ArkUI.ArkUI.Full
196   * @crossplatform
197   * @form
198   * @atomicservice
199   * @since 12
200   */
201  NORMAL = 0,
202
203  /**
204   * Emphasized button (with emphasized background color).
205   *
206   * @syscap SystemCapability.ArkUI.ArkUI.Full
207   * @crossplatform
208   * @form
209   * @since 11
210   */
211  /**
212   * Emphasized button (with emphasized background color).
213   *
214   * @syscap SystemCapability.ArkUI.ArkUI.Full
215   * @crossplatform
216   * @form
217   * @atomicservice
218   * @since 12
219   */
220  EMPHASIZED = 1,
221
222  /**
223   * Textual button (with none background color).
224   *
225   * @syscap SystemCapability.ArkUI.ArkUI.Full
226   * @crossplatform
227   * @form
228   * @since 11
229   */
230  /**
231   * Textual button (with none background color).
232   *
233   * @syscap SystemCapability.ArkUI.ArkUI.Full
234   * @crossplatform
235   * @form
236   * @atomicservice
237   * @since 12
238   */
239  TEXTUAL = 2,
240}
241
242/**
243 * Enum for button role.
244 *
245 * @enum { number }
246 * @syscap SystemCapability.ArkUI.ArkUI.Full
247 * @crossplatform
248 * @form
249 * @atomicservice
250 * @since 12
251 */
252declare enum ButtonRole {
253  /**
254   * Normal button.
255   *
256   * @syscap SystemCapability.ArkUI.ArkUI.Full
257   * @crossplatform
258   * @form
259   * @atomicservice
260   * @since 12
261   */
262  NORMAL = 0,
263
264  /**
265   * Error button.
266   *
267   * @syscap SystemCapability.ArkUI.ArkUI.Full
268   * @crossplatform
269   * @form
270   * @atomicservice
271   * @since 12
272   */
273  ERROR = 1,
274}
275
276/**
277 * Defines the callback type used in ButtonConfiguration.
278 *
279 * @typedef {function} ButtonTriggerClickCallback
280 * @param { number } xPos - The value of xPos is x coordinate.
281 * @param { number } yPos - The value of yPos is y coordinate.
282 * @syscap SystemCapability.ArkUI.ArkUI.Full
283 * @crossplatform
284 * @atomicservice
285 * @since 12
286 */
287declare type ButtonTriggerClickCallback = (xPos: number, yPos: number) => void;
288
289/**
290 * ButtonConfiguration used by button content modifier.
291 *
292 * @extends CommonConfiguration<ButtonConfiguration>
293 * @interface ButtonConfiguration
294 * @syscap SystemCapability.ArkUI.ArkUI.Full
295 * @crossplatform
296 * @atomicservice
297 * @since 12
298 */
299
300declare interface ButtonConfiguration extends CommonConfiguration<ButtonConfiguration> {
301  /**
302   * Button with inner text label.
303   *
304   * @type { string }
305   * @syscap SystemCapability.ArkUI.ArkUI.Full
306   * @crossplatform
307   * @atomicservice
308   * @since 12
309   */
310  label: string;
311
312  /**
313   * Indicates whether the button is pressed.
314   *
315   * @type { boolean }
316   * @syscap SystemCapability.ArkUI.ArkUI.Full
317   * @crossplatform
318   * @atomicservice
319   * @since 12
320   */
321  pressed: boolean;
322
323  /**
324   * Trigger button click x coordinate and y coordinate.
325   *
326   * @type { ButtonTriggerClickCallback }
327   * @syscap SystemCapability.ArkUI.ArkUI.Full
328   * @crossplatform
329   * @atomicservice
330   * @since 12
331   */
332  triggerClick: ButtonTriggerClickCallback;
333}
334
335/**
336 * Enum for Control Size.
337 *
338 * @enum { string }
339 * @syscap SystemCapability.ArkUI.ArkUI.Full
340 * @crossplatform
341 * @form
342 * @since 11
343 */
344/**
345 * Enum for Control Size.
346 *
347 * @enum { string }
348 * @syscap SystemCapability.ArkUI.ArkUI.Full
349 * @crossplatform
350 * @form
351 * @atomicservice
352 * @since 12
353 */
354declare enum ControlSize {
355  /**
356   * The component size is small.
357   *
358   * @syscap SystemCapability.ArkUI.ArkUI.Full
359   * @crossplatform
360   * @form
361   * @since 11
362   */
363  /**
364   * The component size is small.
365   *
366   * @syscap SystemCapability.ArkUI.ArkUI.Full
367   * @crossplatform
368   * @form
369   * @atomicservice
370   * @since 12
371   */
372  SMALL = 'small',
373
374  /**
375   * The component size is normal.
376   *
377   * @syscap SystemCapability.ArkUI.ArkUI.Full
378   * @crossplatform
379   * @form
380   * @since 11
381   */
382  /**
383   * The component size is normal.
384   *
385   * @syscap SystemCapability.ArkUI.ArkUI.Full
386   * @crossplatform
387   * @form
388   * @atomicservice
389   * @since 12
390   */
391  NORMAL = 'normal',
392}
393
394/**
395 * Defines the button options.
396 *
397 * @interface ButtonOptions
398 * @syscap SystemCapability.ArkUI.ArkUI.Full
399 * @since 7
400 */
401/**
402 * Defines the button options.
403 *
404 * @interface ButtonOptions
405 * @syscap SystemCapability.ArkUI.ArkUI.Full
406 * @form
407 * @since 9
408 */
409/**
410 * Defines the button options.
411 *
412 * @interface ButtonOptions
413 * @syscap SystemCapability.ArkUI.ArkUI.Full
414 * @crossplatform
415 * @form
416 * @since 10
417 */
418/**
419 * Defines the button options.
420 *
421 * @interface ButtonOptions
422 * @syscap SystemCapability.ArkUI.ArkUI.Full
423 * @crossplatform
424 * @form
425 * @atomicservice
426 * @since 11
427 */
428declare interface ButtonOptions {
429  /**
430   * Describes the button style.
431   *
432   * @type { ?ButtonType }
433   * @syscap SystemCapability.ArkUI.ArkUI.Full
434   * @since 7
435   */
436  /**
437   * Describes the button style.
438   *
439   * @type { ?ButtonType }
440   * @syscap SystemCapability.ArkUI.ArkUI.Full
441   * @form
442   * @since 9
443   */
444  /**
445   * Describes the button style.
446   *
447   * @type { ?ButtonType }
448   * @syscap SystemCapability.ArkUI.ArkUI.Full
449   * @crossplatform
450   * @form
451   * @since 10
452   */
453  /**
454   * Describes the button style.
455   *
456   * @type { ?ButtonType }
457   * @syscap SystemCapability.ArkUI.ArkUI.Full
458   * @crossplatform
459   * @form
460   * @atomicservice
461   * @since 11
462   */
463  type?: ButtonType;
464
465  /**
466   * Indicates whether to enable the switchover effect when the button is pressed. When the status is set to false, the switchover effect is disabled.
467   *
468   * @type { ?boolean }
469   * @syscap SystemCapability.ArkUI.ArkUI.Full
470   * @since 7
471   */
472  /**
473   * Indicates whether to enable the switchover effect when the button is pressed. When the status is set to false, the switchover effect is disabled.
474   *
475   * @type { ?boolean }
476   * @syscap SystemCapability.ArkUI.ArkUI.Full
477   * @form
478   * @since 9
479   */
480  /**
481   * Indicates whether to enable the switchover effect when the button is pressed. When the status is set to false, the switchover effect is disabled.
482   *
483   * @type { ?boolean }
484   * @syscap SystemCapability.ArkUI.ArkUI.Full
485   * @crossplatform
486   * @form
487   * @since 10
488   */
489  /**
490   * Indicates whether to enable the switchover effect when the button is pressed. When the status is set to false, the switchover effect is disabled.
491   *
492   * @type { ?boolean }
493   * @syscap SystemCapability.ArkUI.ArkUI.Full
494   * @crossplatform
495   * @form
496   * @atomicservice
497   * @since 11
498   */
499  stateEffect?: boolean;
500
501  /**
502   * Describes the button style.
503   *
504   * @type { ?ButtonStyleMode }
505   * @default ButtonStyleMode.EMPHASIZED
506   * @syscap SystemCapability.ArkUI.ArkUI.Full
507   * @crossplatform
508   * @form
509   * @since 11
510   */
511  /**
512   * Describes the button style.
513   *
514   * @type { ?ButtonStyleMode }
515   * @default ButtonStyleMode.EMPHASIZED
516   * @syscap SystemCapability.ArkUI.ArkUI.Full
517   * @crossplatform
518   * @form
519   * @atomicservice
520   * @since 12
521   */
522  buttonStyle?: ButtonStyleMode;
523
524  /**
525   * Describes the button size.
526   *
527   * @type { ?ControlSize }
528   * @default ControlSize.NORMAL
529   * @syscap SystemCapability.ArkUI.ArkUI.Full
530   * @crossplatform
531   * @form
532   * @since 11
533   */
534  /**
535   * Describes the button size.
536   *
537   * @type { ?ControlSize }
538   * @default ControlSize.NORMAL
539   * @syscap SystemCapability.ArkUI.ArkUI.Full
540   * @crossplatform
541   * @form
542   * @atomicservice
543   * @since 12
544   */
545  controlSize?: ControlSize;
546
547  /**
548   * Describes the button role.
549   *
550   * @type { ?ButtonRole }
551   * @default ButtonRole.NORMAL
552   * @syscap SystemCapability.ArkUI.ArkUI.Full
553   * @crossplatform
554   * @form
555   * @atomicservice
556   * @since 12
557   */
558    role?: ButtonRole;
559}
560
561/**
562 * Defines the Button Component.
563 *
564 * @interface ButtonInterface
565 * @syscap SystemCapability.ArkUI.ArkUI.Full
566 * @since 7
567 */
568/**
569 * Defines the Button Component.
570 *
571 * @interface ButtonInterface
572 * @syscap SystemCapability.ArkUI.ArkUI.Full
573 * @form
574 * @since 9
575 */
576/**
577 * Defines the Button Component.
578 *
579 * @interface ButtonInterface
580 * @syscap SystemCapability.ArkUI.ArkUI.Full
581 * @crossplatform
582 * @form
583 * @since 10
584 */
585/**
586 * Defines the Button Component.
587 *
588 * @interface ButtonInterface
589 * @syscap SystemCapability.ArkUI.ArkUI.Full
590 * @crossplatform
591 * @form
592 * @atomicservice
593 * @since 11
594 */
595interface ButtonInterface {
596  /**
597   * Button object
598   *
599   * @returns { ButtonAttribute }
600   * @syscap SystemCapability.ArkUI.ArkUI.Full
601   * @since 7
602   */
603  /**
604   * Button object
605   *
606   * @returns { ButtonAttribute }
607   * @syscap SystemCapability.ArkUI.ArkUI.Full
608   * @form
609   * @since 9
610   */
611  /**
612   * Button object
613   *
614   * @returns { ButtonAttribute }
615   * @syscap SystemCapability.ArkUI.ArkUI.Full
616   * @crossplatform
617   * @form
618   * @since 10
619   */
620  /**
621   * Button object
622   *
623   * @returns { ButtonAttribute }
624   * @syscap SystemCapability.ArkUI.ArkUI.Full
625   * @crossplatform
626   * @form
627   * @atomicservice
628   * @since 11
629   */
630  (): ButtonAttribute;
631
632  /**
633   * Create Button with Text child.
634   *
635   * @param { ButtonOptions } options
636   * @returns { ButtonAttribute }
637   * @syscap SystemCapability.ArkUI.ArkUI.Full
638   * @since 7
639   */
640  /**
641   * Create Button with Text child.
642   *
643   * @param { ButtonOptions } options
644   * @returns { ButtonAttribute }
645   * @syscap SystemCapability.ArkUI.ArkUI.Full
646   * @form
647   * @since 9
648   */
649  /**
650   * Create Button with Text child.
651   *
652   * @param { ButtonOptions } options
653   * @returns { ButtonAttribute }
654   * @syscap SystemCapability.ArkUI.ArkUI.Full
655   * @crossplatform
656   * @form
657   * @since 10
658   */
659  /**
660   * Create Button with Text child.
661   *
662   * @param { ButtonOptions } options
663   * @returns { ButtonAttribute }
664   * @syscap SystemCapability.ArkUI.ArkUI.Full
665   * @crossplatform
666   * @form
667   * @atomicservice
668   * @since 11
669   */
670  (options: ButtonOptions): ButtonAttribute;
671
672  /**
673   * Create Button with inner text label.
674   *
675   * @param { ResourceStr } label
676   * @param { ButtonOptions } options
677   * @returns { ButtonAttribute }
678   * @syscap SystemCapability.ArkUI.ArkUI.Full
679   * @since 7
680   */
681  /**
682   * Create Button with inner text label.
683   *
684   * @param { ResourceStr } label
685   * @param { ButtonOptions } options
686   * @returns { ButtonAttribute }
687   * @syscap SystemCapability.ArkUI.ArkUI.Full
688   * @form
689   * @since 9
690   */
691  /**
692   * Create Button with inner text label.
693   *
694   * @param { ResourceStr } label
695   * @param { ButtonOptions } options
696   * @returns { ButtonAttribute }
697   * @syscap SystemCapability.ArkUI.ArkUI.Full
698   * @crossplatform
699   * @form
700   * @since 10
701   */
702  /**
703   * Create Button with inner text label.
704   *
705   * @param { ResourceStr } label
706   * @param { ButtonOptions } options
707   * @returns { ButtonAttribute }
708   * @syscap SystemCapability.ArkUI.ArkUI.Full
709   * @crossplatform
710   * @form
711   * @atomicservice
712   * @since 11
713   */
714  (label: ResourceStr, options?: ButtonOptions): ButtonAttribute;
715}
716
717/**
718 * LabelStyle object.
719 *
720 * @interface LabelStyle
721 * @syscap SystemCapability.ArkUI.ArkUI.Full
722 * @crossplatform
723 * @since 10
724 */
725/**
726 * LabelStyle object.
727 *
728 * @interface LabelStyle
729 * @syscap SystemCapability.ArkUI.ArkUI.Full
730 * @crossplatform
731 * @atomicservice
732 * @since 11
733 */
734declare interface LabelStyle {
735  /**
736   * overflow mode.
737   *
738   * @type { ?TextOverflow }
739   * @syscap SystemCapability.ArkUI.ArkUI.Full
740   * @crossplatform
741   * @since 10
742   */
743  /**
744   * overflow mode.
745   *
746   * @type { ?TextOverflow }
747   * @syscap SystemCapability.ArkUI.ArkUI.Full
748   * @crossplatform
749   * @atomicservice
750   * @since 11
751   */
752  overflow?: TextOverflow;
753
754  /**
755   * Label max lines.
756   *
757   * @type { ?number }
758   * @syscap SystemCapability.ArkUI.ArkUI.Full
759   * @crossplatform
760   * @since 10
761   */
762  /**
763   * Label max lines.
764   *
765   * @type { ?number }
766   * @syscap SystemCapability.ArkUI.ArkUI.Full
767   * @crossplatform
768   * @atomicservice
769   * @since 11
770   */
771  maxLines?: number;
772
773  /**
774   * Min font size for adapted height.
775   *
776   * @type { ?(number | ResourceStr) }
777   * @syscap SystemCapability.ArkUI.ArkUI.Full
778   * @crossplatform
779   * @since 10
780   */
781  /**
782   * Min font size for adapted height.
783   *
784   * @type { ?(number | ResourceStr) }
785   * @syscap SystemCapability.ArkUI.ArkUI.Full
786   * @crossplatform
787   * @atomicservice
788   * @since 11
789   */
790  minFontSize?: number | ResourceStr;
791
792  /**
793   * Max font size for adapted height.
794   *
795   * @type { ?(number | ResourceStr) }
796   * @syscap SystemCapability.ArkUI.ArkUI.Full
797   * @crossplatform
798   * @since 10
799   */
800  /**
801   * Max font size for adapted height.
802   *
803   * @type { ?(number | ResourceStr) }
804   * @syscap SystemCapability.ArkUI.ArkUI.Full
805   * @crossplatform
806   * @atomicservice
807   * @since 11
808   */
809  maxFontSize?: number | ResourceStr;
810
811  /**
812   * Adapt text height option.
813   *
814   * @type { ?TextHeightAdaptivePolicy }
815   * @syscap SystemCapability.ArkUI.ArkUI.Full
816   * @crossplatform
817   * @since 10
818   */
819  /**
820   * Adapt text height option.
821   *
822   * @type { ?TextHeightAdaptivePolicy }
823   * @syscap SystemCapability.ArkUI.ArkUI.Full
824   * @crossplatform
825   * @atomicservice
826   * @since 11
827   */
828  heightAdaptivePolicy?: TextHeightAdaptivePolicy;
829
830  /**
831   * Font style.
832   *
833   * @type { ?Font }
834   * @syscap SystemCapability.ArkUI.ArkUI.Full
835   * @crossplatform
836   * @since 10
837   */
838  /**
839   * Font style.
840   *
841   * @type { ?Font }
842   * @syscap SystemCapability.ArkUI.ArkUI.Full
843   * @crossplatform
844   * @atomicservice
845   * @since 11
846   */
847  font?: Font;
848}
849
850/**
851 * Defines the button attribute functions.
852 *
853 * @extends CommonMethod<ButtonAttribute>
854 * @syscap SystemCapability.ArkUI.ArkUI.Full
855 * @since 7
856 */
857/**
858 * Defines the button attribute functions.
859 *
860 * @extends CommonMethod<ButtonAttribute>
861 * @syscap SystemCapability.ArkUI.ArkUI.Full
862 * @form
863 * @since 9
864 */
865/**
866 * Defines the button attribute functions.
867 *
868 * @extends CommonMethod<ButtonAttribute>
869 * @syscap SystemCapability.ArkUI.ArkUI.Full
870 * @crossplatform
871 * @form
872 * @since 10
873 */
874/**
875 * Defines the button attribute functions.
876 *
877 * @extends CommonMethod<ButtonAttribute>
878 * @syscap SystemCapability.ArkUI.ArkUI.Full
879 * @crossplatform
880 * @form
881 * @atomicservice
882 * @since 11
883 */
884declare class ButtonAttribute extends CommonMethod<ButtonAttribute> {
885  /**
886   * Describes the button style.
887   *
888   * @param { ButtonType } value
889   * @returns { ButtonAttribute }
890   * @syscap SystemCapability.ArkUI.ArkUI.Full
891   * @since 7
892   */
893  /**
894   * Describes the button style.
895   *
896   * @param { ButtonType } value
897   * @returns { ButtonAttribute }
898   * @syscap SystemCapability.ArkUI.ArkUI.Full
899   * @form
900   * @since 9
901   */
902  /**
903   * Describes the button style.
904   *
905   * @param { ButtonType } value
906   * @returns { ButtonAttribute }
907   * @syscap SystemCapability.ArkUI.ArkUI.Full
908   * @crossplatform
909   * @form
910   * @since 10
911   */
912  /**
913   * Describes the button style.
914   *
915   * @param { ButtonType } value
916   * @returns { ButtonAttribute }
917   * @syscap SystemCapability.ArkUI.ArkUI.Full
918   * @crossplatform
919   * @form
920   * @atomicservice
921   * @since 11
922   */
923  type(value: ButtonType): ButtonAttribute;
924
925  /**
926   * Indicates whether to enable the switchover effect when the button is pressed. When the status is set to false, the switchover effect is disabled.
927   *
928   * @param { boolean } value
929   * @returns { ButtonAttribute }
930   * @syscap SystemCapability.ArkUI.ArkUI.Full
931   * @since 7
932   */
933  /**
934   * Indicates whether to enable the switchover effect when the button is pressed. When the status is set to false, the switchover effect is disabled.
935   *
936   * @param { boolean } value
937   * @returns { ButtonAttribute }
938   * @syscap SystemCapability.ArkUI.ArkUI.Full
939   * @form
940   * @since 9
941   */
942  /**
943   * Indicates whether to enable the switchover effect when the button is pressed. When the status is set to false, the switchover effect is disabled.
944   *
945   * @param { boolean } value
946   * @returns { ButtonAttribute }
947   * @syscap SystemCapability.ArkUI.ArkUI.Full
948   * @crossplatform
949   * @form
950   * @since 10
951   */
952  /**
953   * Indicates whether to enable the switchover effect when the button is pressed. When the status is set to false, the switchover effect is disabled.
954   *
955   * @param { boolean } value
956   * @returns { ButtonAttribute }
957   * @syscap SystemCapability.ArkUI.ArkUI.Full
958   * @crossplatform
959   * @form
960   * @atomicservice
961   * @since 11
962   */
963  stateEffect(value: boolean): ButtonAttribute;
964
965  /**
966   * Describes the button style.
967   *
968   * @param { ButtonStyleMode } value - button style mode
969   * @returns { ButtonAttribute }
970   * @syscap SystemCapability.ArkUI.ArkUI.Full
971   * @crossplatform
972   * @form
973   * @since 11
974   */
975  /**
976   * Describes the button style.
977   *
978   * @param { ButtonStyleMode } value - button style mode
979   * @returns { ButtonAttribute }
980   * @syscap SystemCapability.ArkUI.ArkUI.Full
981   * @crossplatform
982   * @form
983   * @atomicservice
984   * @since 12
985   */
986  buttonStyle(value: ButtonStyleMode): ButtonAttribute;
987
988  /**
989   * Set the Button size.
990   *
991   * @param { ControlSize } value - control size
992   * @returns { ButtonAttribute }
993   * @syscap SystemCapability.ArkUI.ArkUI.Full
994   * @crossplatform
995   * @form
996   * @since 11
997   */
998  /**
999   * Set the Button size.
1000   *
1001   * @param { ControlSize } value - control size
1002   * @returns { ButtonAttribute }
1003   * @syscap SystemCapability.ArkUI.ArkUI.Full
1004   * @crossplatform
1005   * @form
1006   * @atomicservice
1007   * @since 12
1008   */
1009  controlSize(value: ControlSize): ButtonAttribute;
1010
1011  /**
1012   * Set the Button role.
1013   *
1014   * @param { ButtonRole } value - button role
1015   * @returns { ButtonAttribute }
1016   * @syscap SystemCapability.ArkUI.ArkUI.Full
1017   * @crossplatform
1018   * @form
1019   * @atomicservice
1020   * @since 12
1021   */
1022  role(value: ButtonRole): ButtonAttribute;
1023
1024  /**
1025   * Text color.
1026   *
1027   * @param { ResourceColor } value
1028   * @returns { ButtonAttribute }
1029   * @syscap SystemCapability.ArkUI.ArkUI.Full
1030   * @since 7
1031   */
1032  /**
1033   * Text color.
1034   *
1035   * @param { ResourceColor } value
1036   * @returns { ButtonAttribute }
1037   * @syscap SystemCapability.ArkUI.ArkUI.Full
1038   * @form
1039   * @since 9
1040   */
1041  /**
1042   * Text color.
1043   *
1044   * @param { ResourceColor } value
1045   * @returns { ButtonAttribute }
1046   * @syscap SystemCapability.ArkUI.ArkUI.Full
1047   * @crossplatform
1048   * @form
1049   * @since 10
1050   */
1051  /**
1052   * Text color.
1053   *
1054   * @param { ResourceColor } value
1055   * @returns { ButtonAttribute }
1056   * @syscap SystemCapability.ArkUI.ArkUI.Full
1057   * @crossplatform
1058   * @form
1059   * @atomicservice
1060   * @since 11
1061   */
1062  fontColor(value: ResourceColor): ButtonAttribute;
1063
1064  /**
1065   * Text size.
1066   *
1067   * @param { Length } value
1068   * @returns { ButtonAttribute }
1069   * @syscap SystemCapability.ArkUI.ArkUI.Full
1070   * @since 7
1071   */
1072  /**
1073   * Text size.
1074   *
1075   * @param { Length } value
1076   * @returns { ButtonAttribute }
1077   * @syscap SystemCapability.ArkUI.ArkUI.Full
1078   * @form
1079   * @since 9
1080   */
1081  /**
1082   * Text size.
1083   *
1084   * @param { Length } value
1085   * @returns { ButtonAttribute }
1086   * @syscap SystemCapability.ArkUI.ArkUI.Full
1087   * @crossplatform
1088   * @form
1089   * @since 10
1090   */
1091  /**
1092   * Text size.
1093   *
1094   * @param { Length } value
1095   * @returns { ButtonAttribute }
1096   * @syscap SystemCapability.ArkUI.ArkUI.Full
1097   * @crossplatform
1098   * @form
1099   * @atomicservice
1100   * @since 11
1101   */
1102  fontSize(value: Length): ButtonAttribute;
1103
1104  /**
1105   * Font weight.
1106   *
1107   * @param { number | FontWeight | string } value
1108   * @returns { ButtonAttribute }
1109   * @syscap SystemCapability.ArkUI.ArkUI.Full
1110   * @since 7
1111   */
1112  /**
1113   * Font weight.
1114   *
1115   * @param { number | FontWeight | string } value
1116   * @returns { ButtonAttribute }
1117   * @syscap SystemCapability.ArkUI.ArkUI.Full
1118   * @form
1119   * @since 9
1120   */
1121  /**
1122   * Font weight.
1123   *
1124   * @param { number | FontWeight | string } value
1125   * @returns { ButtonAttribute }
1126   * @syscap SystemCapability.ArkUI.ArkUI.Full
1127   * @crossplatform
1128   * @form
1129   * @since 10
1130   */
1131  /**
1132   * Font weight.
1133   *
1134   * @param { number | FontWeight | string } value
1135   * @returns { ButtonAttribute }
1136   * @syscap SystemCapability.ArkUI.ArkUI.Full
1137   * @crossplatform
1138   * @form
1139   * @atomicservice
1140   * @since 11
1141   */
1142  fontWeight(value: number | FontWeight | string): ButtonAttribute;
1143
1144  /**
1145   * Font style.
1146   *
1147   * @param { FontStyle } value
1148   * @returns { ButtonAttribute }
1149   * @syscap SystemCapability.ArkUI.ArkUI.Full
1150   * @since 8
1151   */
1152  /**
1153   * Font style.
1154   *
1155   * @param { FontStyle } value
1156   * @returns { ButtonAttribute }
1157   * @syscap SystemCapability.ArkUI.ArkUI.Full
1158   * @form
1159   * @since 9
1160   */
1161  /**
1162   * Font style.
1163   *
1164   * @param { FontStyle } value
1165   * @returns { ButtonAttribute }
1166   * @syscap SystemCapability.ArkUI.ArkUI.Full
1167   * @crossplatform
1168   * @form
1169   * @since 10
1170   */
1171  /**
1172   * Font style.
1173   *
1174   * @param { FontStyle } value
1175   * @returns { ButtonAttribute }
1176   * @syscap SystemCapability.ArkUI.ArkUI.Full
1177   * @crossplatform
1178   * @form
1179   * @atomicservice
1180   * @since 11
1181   */
1182  fontStyle(value: FontStyle): ButtonAttribute;
1183
1184  /**
1185   * Font family.
1186   *
1187   * @param { string | Resource } value
1188   * @returns { ButtonAttribute }
1189   * @syscap SystemCapability.ArkUI.ArkUI.Full
1190   * @since 8
1191   */
1192  /**
1193   * Font family.
1194   *
1195   * @param { string | Resource } value
1196   * @returns { ButtonAttribute }
1197   * @syscap SystemCapability.ArkUI.ArkUI.Full
1198   * @form
1199   * @since 9
1200   */
1201  /**
1202   * Font family.
1203   *
1204   * @param { string | Resource } value
1205   * @returns { ButtonAttribute }
1206   * @syscap SystemCapability.ArkUI.ArkUI.Full
1207   * @crossplatform
1208   * @form
1209   * @since 10
1210   */
1211  /**
1212   * Font family.
1213   *
1214   * @param { string | Resource } value
1215   * @returns { ButtonAttribute }
1216   * @syscap SystemCapability.ArkUI.ArkUI.Full
1217   * @crossplatform
1218   * @form
1219   * @atomicservice
1220   * @since 11
1221   */
1222  fontFamily(value: string | Resource): ButtonAttribute;
1223
1224  /**
1225   * Set the content modifier of button.
1226   *
1227   * @param { ContentModifier<ButtonConfiguration> } modifier - The content modifier of button.
1228   * @returns { ButtonAttribute }
1229   * @syscap SystemCapability.ArkUI.ArkUI.Full
1230   * @crossplatform
1231   * @atomicservice
1232   * @since 12
1233   */
1234  contentModifier(modifier: ContentModifier<ButtonConfiguration>): ButtonAttribute;
1235
1236  /**
1237   * Set button label style.
1238   *
1239   * @param { LabelStyle } value - The label style configuration on button.
1240   * @returns { ButtonAttribute }
1241   * @syscap SystemCapability.ArkUI.ArkUI.Full
1242   * @crossplatform
1243   * @since 10
1244   */
1245  /**
1246   * Set button label style.
1247   *
1248   * @param { LabelStyle } value - The label style configuration on button.
1249   * @returns { ButtonAttribute }
1250   * @syscap SystemCapability.ArkUI.ArkUI.Full
1251   * @crossplatform
1252   * @atomicservice
1253   * @since 11
1254   */
1255  labelStyle(value: LabelStyle): ButtonAttribute;
1256
1257  /**
1258   * Sets the minimum zoom-out ratio of the button text.
1259   *
1260   * @param { number | Resource } scale
1261   * @returns { ButtonAttribute }
1262   * @syscap SystemCapability.ArkUI.ArkUI.Full
1263   * @atomicservice
1264   * @since 18
1265   */
1266  minFontScale(scale: number | Resource): ButtonAttribute;
1267
1268  /**
1269   * Sets the maximum magnification of the button text.
1270   *
1271   * @param { number | Resource  } scale
1272   * @returns { ButtonAttribute }
1273   * @syscap SystemCapability.ArkUI.ArkUI.Full
1274   * @atomicservice
1275   * @since 18
1276   */
1277  maxFontScale(scale: number | Resource): ButtonAttribute;
1278}
1279
1280/**
1281 * Defines Button Component.
1282 *
1283 * @syscap SystemCapability.ArkUI.ArkUI.Full
1284 * @since 7
1285 */
1286/**
1287 * Defines Button Component.
1288 *
1289 * @syscap SystemCapability.ArkUI.ArkUI.Full
1290 * @form
1291 * @since 9
1292 */
1293/**
1294 * Defines Button Component.
1295 *
1296 * @syscap SystemCapability.ArkUI.ArkUI.Full
1297 * @crossplatform
1298 * @form
1299 * @since 10
1300 */
1301/**
1302 * Defines Button Component.
1303 *
1304 * @syscap SystemCapability.ArkUI.ArkUI.Full
1305 * @crossplatform
1306 * @form
1307 * @atomicservice
1308 * @since 11
1309 */
1310declare const Button: ButtonInterface;
1311
1312/**
1313 * Defines Button Component instance.
1314 *
1315 * @syscap SystemCapability.ArkUI.ArkUI.Full
1316 * @since 7
1317 */
1318/**
1319 * Defines Button Component instance.
1320 *
1321 * @syscap SystemCapability.ArkUI.ArkUI.Full
1322 * @form
1323 * @since 9
1324 */
1325/**
1326 * Defines Button Component instance.
1327 *
1328 * @syscap SystemCapability.ArkUI.ArkUI.Full
1329 * @crossplatform
1330 * @form
1331 * @since 10
1332 */
1333/**
1334 * Defines Button Component instance.
1335 *
1336 * @syscap SystemCapability.ArkUI.ArkUI.Full
1337 * @crossplatform
1338 * @form
1339 * @atomicservice
1340 * @since 11
1341 */
1342declare const ButtonInstance: ButtonAttribute;
1343