Import

import-button.ts
import { NuiButton } from '@needless-ui/angular/button';

NuiButton

Tạo kiểu nút cho một <button> hoặc <a> native.

Selector
button[nuiButton], a[nuiButton]
Tên export
nuiButton
NuiButton: Thuộc tính
TênKiểuMặc địnhMô tả
variantInput'solid' | 'soft' | 'outline' | 'ghost''solid'Kiểu tô nền: solid, soft, outline hoặc ghost.
toneInput'accent' | 'neutral' | 'danger''accent'Bảng màu: accent, neutral hoặc danger.
sizeInput'sm' | 'md' | 'lg''md'Chiều cao, padding và cỡ chữ: sm, md hoặc lg.
disabledInputbooleanfalseVô hiệu hóa nút. Với thẻ a, directive đặt aria-disabled và chặn việc kích hoạt.
motionInputNuiMotionLò xo quyết định chuyển động của component: snappy, bouncy, jelly, elastic, lazy, mechanical hoặc none.
springInputNuiSpringMột lò xo bất kỳ, dạng { stiffness, damping, mass }, được biên dịch sang CSS lúc runtime. Ghi đè motion.
pressInputNuiPressHiệu ứng khi component được nhấn giữ: sink, squish, pop, wobble, rubber, tilt hoặc none.
cornersInputNuiCornersHình dạng các góc: round, squircle, bevel, scoop, notch hoặc square.
radiusInputNuiRadiusMức bo góc: none, small, medium, large hoặc full.
densityInputNuiDensityLượng không gian mà component chiếm: compact, regular hoặc roomy.

Các input tùy biến mà bạn không đặt sẽ lấy giá trị từ thuộc tính data-nui-* gần nhất. Xem hướng dẫn tùy biến.