
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
@isoftdata/svelte-button
Advanced tools
This component will conditionally render a HTML `` or `` element based on if a `href` prop is passed. This component uses Svelte's [`$$restProps`](https://svelte.dev/docs/basic-markup#attributes-and-props) to apply any additional props you pass
This component will conditionally render a HTML <button> or <a> element based on if a href prop is passed. This component uses Svelte's $$restProps to apply any additional props you pass as attributes on the HTML element.
npm i @isoftdata/svelte-button
| Prop | Type | Description | Default |
|---|---|---|---|
block | boolean | Render the button as block, spanning the whole width of its parent. | false |
button | HTMLButtonElement | HTMLAnchorElement | Either the <button> or <a>. Useful if you want to fire events directly on it. | (The button or anchor tag) |
color | "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark" | The bootstrap color of the button. | "primary" |
colorGreyDisabled | boolean | Whether the button is greyed out when disabled. | true |
disabled | boolean | Whether the button is disabled. | false |
download | string | null | The filename to download when the button is clicked. | null |
href | string | null | The URL to link to when the button is clicked. | null |
icon | object | All options relating to the Icon component. | { class: "", color: null, style: null, prefix: "fas", fixedWidth: true, icon: null } |
iconClass | string | null | The FontAwesome icon name, excluding the leading fa-, e.g. pencil. Either specify this prop, or icon.icon. | null |
id | string | null | The ID of the button. | null |
outline | boolean | Whether the button is outlined. | false |
size | "" | "xs" | "sm" | "lg" | The size of the button. | "" |
style | string | null | The inline style of the button. | null |
target | string | null | The target of the link when the button is clicked. | null |
textClass | string | null | Any classes to apply to the button text | null |
title | string | null | The title of the button. | null |
type | "button" | "submit" | "reset" | The type of the button. | "button" |
wrap | boolean | Whether the button should wrap its contents. | false |
isLoading | boolean | Whether the button is showing a loading icon(and disabled) | false |
<script>
import Button from "@isoftdata/svelte-button"
</script>
<Button
color="primary"
iconClass="0"
on:click={() => alert("Clicked!")}
>
Click Me!
</Button>
<Button
color="danger"
outline
icon={ { icon: "1" } }
size="xs"
href="https://google.com"
target="_blank"
>
Google
</Button>
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.