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