Lewati ke konten

Button - React

Button

banner-background
import { Button } from '@idds/react';
NameTypeDefaultRequiredDescription
hierarchy?'primary' | 'secondary' | 'tertiary' | 'link' | 'custom''primary'NoHierarchy button: primary (background-color: primary-300, color: text-white), secondary (background-color: white, color: text-content-primary, border: stroke-primary), tertiary (background-color: white, color: text-content-primary, border: none, hover: background-tertiary), link (background-color: white, color: text-content-guide, border: none, hover: text-guide-400), custom (untuk custom styling).
size?'2xl' | 'xl' | 'lg' | 'md' | 'sm''md'NoUkuran button: 2xl (max-height: 56px, font-size: 16px, padding: 16px), xl (max-height: 48px, font-size: 16px, padding: 12px 16px), lg (max-height: 44px, font-size: 14px, padding: 12px), md (max-height: 40px, font-size: 14px, padding: 10px 12px), sm (max-height: 32px, font-size: 12px, padding: 8px).
prefixIcon?ReactNodeNoIkon di sebelah kiri teks.
suffixIcon?ReactNodeNoIkon di sebelah kanan teks.
childrenReactNodeYesKonten utama button, bisa berupa teks atau JSX custom.
disabled?booleanfalseNoJika true, button dalam keadaan disabled (tidak bisa di-klik, gaya berubah).
className?string''NoClassName tambahan untuk override styling wrapper.