
com.raquo.laminar.shoelace.sl.IconButton.scala Maven / Gradle / Ivy
package com.raquo.laminar.shoelace.sl
import com.raquo.laminar.keys.{EventProp, HtmlAttr}
import com.raquo.laminar.api.L
import org.scalajs.dom
import scala.scalajs.js
import scala.scalajs.js.|
import scala.scalajs.js.annotation.JSImport
// This file is generated at compile-time by ShoelaceGenerator.scala
/**
* Icons buttons are simple, icon-only buttons that can be used for actions and in toolbars.
*
* [[https://github.com/raquo/laminar-shoelace-components/blob/master/src/main/scala/com/raquo/laminar/shoelace/sl/IconButton.scala IconButton.scala source code]]
*
* [[https://shoelace.style/components/icon-button Shoelace IconButton docs]]
*/
object IconButton extends WebComponent("sl-icon-button") {
@JSImport("@shoelace-style/shoelace/dist/components/icon-button/icon-button.js", JSImport.Namespace)
@js.native object RawImport extends js.Object
type Self = IconButton.type
type Ref = IconButtonComponent with dom.HTMLElement
// -- Events --
/** Emitted when the icon button loses focus. */
lazy val onBlur: EventProp[dom.Event] = eventProp("sl-blur")
/** Emitted when the icon button gains focus. */
lazy val onFocus: EventProp[dom.Event] = eventProp("sl-focus")
// -- Attributes --
/** The name of the icon to draw. Available names depend on the icon library being used. */
lazy val name: HtmlAttr[String] = stringAttr("name")
/** The name of a registered custom icon library. */
lazy val library: HtmlAttr[String] = stringAttr("library")
/**
* An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and
* can result in XSS attacks.
*/
lazy val src: HtmlAttr[String] = stringAttr("src")
/** When set, the underlying button will be rendered as an `` with this `href` instead of a `
© 2015 - 2025 Weber Informatics LLC | Privacy Policy