🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

@isoftdata/svelte-button

Package Overview
Dependencies
Maintainers
12
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@isoftdata/svelte-button

## Install

npmnpm
Version
1.0.3
Version published
Weekly downloads
115
-60.88%
Maintainers
12
Weekly downloads
 
Created
Source

Svelte Button

Install

npm i @isoftdata/svelte-button

Props

PropTypeDescriptionDefault
blockbooleanRender the button as block, spanning the whole width of its parent.false
color"primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark"The bootstrap color of the button."primary"
colorGreyDisabledbooleanWhether the button is greyed out when disabled.true
disabledbooleanWhether the button is disabled.false
downloadstring | nullThe filename to download when the button is clicked.null
hrefstring | nullThe URL to link to when the button is clicked.null
iconobjectAll options relating to the Icon component.{ class: "", color: null, style: null, prefix: "far", fixedWidth: true, icon: null }
iconClassstring | nullThe FontAwesome icon name, excluding the leading fa-, e.g. pencil. Either specify this prop, or icon.icon.null
idstring | nullThe ID of the button.null
outlinebooleanWhether the button is outlined.false
size"" | "xs" | "sm" | "lg"The size of the button.""
stylestring | nullThe inline style of the button.null
targetstring | nullThe target of the link when the button is clicked.null
textClassstring | nullAny classes to apply to the button textnull
titlestring | nullThe title of the button.null
type"button" | "submit" | "reset"The type of the button."button"
wrapbooleanWhether the button should wrap its contents.false

Example

<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

Package last updated on 26 Sep 2023

Did you know?

Socket

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.

Install

Related posts