@freedomcore/button-fc
v0.2.1
Published
Foundational button component with variants, sizes, states, and optional Tauri invoke
Maintainers
Readme
@freedomcore/button-fc
Foundational button web component with variants, sizes, states, and optional Tauri integration.
Installation
npm install @freedomcore/button-fcUsage
<link rel="stylesheet" href="node_modules/@freedomcore/button-fc/button-fc.css">
<button-fc>Default</button-fc>
<button-fc variant="primary">Primary</button-fc>
<button-fc variant="ghost" size="sm">Small Ghost</button-fc>
<button-fc variant="danger" disabled>Disabled</button-fc>
<script type="module">
import '@freedomcore/button-fc';
</script>Attributes
| Attribute | Values | Default |
|-----------|--------|---------|
| variant | default, primary, secondary, ghost, danger | default |
| size | sm, md, lg | md |
| disabled | boolean | false |
| invoke | Tauri command name | — |
Tauri Integration
<!-- Calls Tauri command on click -->
<button-fc invoke="open_settings">Settings</button-fc>CSS Variables
--btn-bg: var(--surface-2);
--btn-color: var(--text-1);
--btn-radius: 6px;
--btn-padding: 0.5em 1em;License
MIT © FreedomCore
