Button
Displays a button or a component that looks like a button.
Installation
Run the following cli command or copy/paste the component code into your project
Examples
Primary
import { component$ } from '@builder.io/qwik';
import { Button } from '~/components/ui';
export default component$(() => {
return (
<>
<Button look="primary">Primary</Button>
</>
);
});
Secondary
import { component$ } from '@builder.io/qwik';
import { Button } from '~/components/ui';
export default component$(() => {
return (
<>
<Button look="secondary">Secondary</Button>
</>
);
});
Alert
import { component$ } from '@builder.io/qwik';
import { Button } from '~/components/ui';
export default component$(() => {
return (
<>
<Button look="alert">Alert</Button>
</>
);
});
Outline
import { component$ } from '@builder.io/qwik';
import { Button } from '~/components/ui';
export default component$(() => {
return (
<>
<Button look="outline">Outline</Button>
</>
);
});
Ghost
import { component$ } from '@builder.io/qwik';
import { Button } from '~/components/ui';
export default component$(() => {
return (
<>
<Button look="ghost">Ghost</Button>
</>
);
});
Link
import { component$ } from '@builder.io/qwik';
import { Button } from '~/components/ui';
export default component$(() => {
return (
<>
<Button look="link">Link</Button>
</>
);
});
Large and Small
import { component$ } from '@builder.io/qwik';
import { Button } from '~/components/ui';
export default component$(() => {
return (
<>
<Button size="sm">Button</Button>
<Button>Button</Button>
<Button size="lg">Button</Button>
</>
);
});
Icon
import { component$ } from '@builder.io/qwik';
import { Button } from '~/components/ui';
import { LuGithub } from '@qwikest/icons/lucide';
export default component$(() => {
return (
<Button size="icon">
<LuGithub />
</Button>
);
});
With Icon
import { component$ } from '@builder.io/qwik';
import { Button } from '~/components/ui';
import { LuMail } from '@qwikest/icons/lucide';
export default component$(() => {
return (
<Button>
<LuMail class="mr-2" /> Login with Email
</Button>
);
});
Loading
import { component$ } from '@builder.io/qwik';
import { Button } from '~/components/ui';
import { LuLoader2 } from '@qwikest/icons/lucide';
export default component$(() => {
return (
<Button disabled>
<LuLoader2 class="mr-2 h-5 w-5 animate-spin" /> Login with Email
</Button>
);
});