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