Button

Atom

Temel interaktif element. 5 görsel stil (variant) ve 5 boyut (size) destekler. disabled, loading ve selected durumları yerleşiktir.

Primary

Preview
Code
<%- include('modules/ui/Button', { children: 'Primary' }) %>

Secondary

Preview
Code
<%- include('modules/ui/Button', { variant: 'secondary', children: 'Secondary' }) %>

Ghost

Preview
Code
<%- include('modules/ui/Button', { variant: 'ghost', children: 'Ghost' }) %>

Danger

Preview
Code
<%- include('modules/ui/Button', { variant: 'danger', children: 'Danger' }) %>

Outline

Preview
Code
<%- include('modules/ui/Button', { variant: 'outline', children: 'Outline' }) %>

Disabled

Preview
Code
<%- include('modules/ui/Button', { disabled: true, children: 'Disabled' }) %>

Sizes

Preview
Code
<%- include('modules/ui/Button', { size: 'xs', children: 'XS' }) %>
<%- include('modules/ui/Button', { size: 'sm', children: 'SM' }) %>
<%- include('modules/ui/Button', { size: 'md', children: 'MD' }) %>
<%- include('modules/ui/Button', { size: 'lg', children: 'LG' }) %>
<%- include('modules/ui/Button', { size: 'xl', children: 'XL' }) %>

Icon left / right

Preview
Code
<%- include('modules/ui/Button', { iconLeft: '', children: 'Download' }) %>
<%- include('modules/ui/Button', { variant: 'outline', iconRight: '', children: 'Next' }) %>

Icon only

Preview
Code
<%- include('modules/ui/Button', { ariaLabel: 'Delete item', children: '' }) %>
<%- include('modules/ui/Button', { variant: 'outline', ariaLabel: 'Edit item', children: '' }) %>

Selected / active state

Preview
Code
<%- include('modules/ui/Button', { variant: 'outline', selected: true,  children: 'Selected' }) %>
<%- include('modules/ui/Button', { variant: 'outline', selected: false, children: 'Default' }) %>

Loading state

Preview
Code
<%- include('modules/ui/Button', { loading: true, children: 'Saving…' }) %>
<%- include('modules/ui/Button', { variant: 'outline', loading: true, children: 'Loading details' }) %>

As Link (element override)

Code
<%- include('modules/ui/Button', { element: 'a', href: '/docs', children: 'Go to docs' }) %>
<%- include('modules/ui/Button', { element: 'a', href: 'https://example.com', target: '_blank', variant: 'outline', children: 'Open in new tab' }) %>
<%- include('modules/ui/Button', { element: 'a', href: '/next', variant: 'secondary', iconRight: '', children: 'Next page' }) %>
<%- include('modules/ui/Button', { element: 'a', href: '#', disabled: true, children: 'Disabled link' }) %>

Full width

Preview
Code
<%- include('modules/ui/Button', { fullWidth: true, children: 'Full-width primary' }) %>
<%- include('modules/ui/Button', { variant: 'outline', fullWidth: true, children: 'Full-width outline' }) %>
Source modules/ui/Button.ejs