Import
import { NuiButton } from '@needless-ui/angular/button';NuiButton
กำหนดสไตล์ปุ่มให้ <button> หรือ <a> แบบเนทีฟ
| ชื่อ | ชนิด | ค่าเริ่มต้น | คำอธิบาย |
|---|---|---|---|
variantInput | 'solid' | 'soft' | 'outline' | 'ghost' | 'solid' | รูปแบบพื้นสี: solid soft outline หรือ ghost |
toneInput | 'accent' | 'neutral' | 'danger' | 'accent' | ชุดสี: accent neutral หรือ danger |
sizeInput | 'sm' | 'md' | 'lg' | 'md' | ความสูง padding และขนาดตัวอักษร: sm md หรือ lg |
disabledInput | boolean | false | ปิดใช้งานปุ่ม สำหรับเอลิเมนต์ a จะตั้งค่า aria-disabled และป้องกันไม่ให้ลิงก์ทำงาน |
motionInput | NuiMotion | สปริงที่ใช้ในการเคลื่อนไหว: snappy bouncy jelly elastic lazy mechanical หรือ none | |
springInput | NuiSpring | สปริงแบบใดก็ได้ในรูป { stiffness, damping, mass } ซึ่งจะคอมไพล์เป็น CSS ขณะรันไทม์ และใช้แทน motion | |
pressInput | NuiPress | สิ่งที่เกิดขึ้นขณะกดค้างไว้: sink squish pop wobble rubber tilt หรือ none | |
cornersInput | NuiCorners | รูปทรงของมุม: round squircle bevel scoop notch หรือ square | |
radiusInput | NuiRadius | ขนาดของมุม: none small medium large หรือ full | |
densityInput | NuiDensity | พื้นที่ที่ใช้: compact regular หรือ roomy |
Input สำหรับการปรับแต่งที่ไม่ได้กำหนดค่าไว้ จะใช้ค่าตาม attribute data-nui-* ที่อยู่ใกล้ที่สุด ดูคู่มือการปรับแต่ง