Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@fw-components/fw-theme-builder

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fw-components/fw-theme-builder

Theme builder web component

latest
npmnpm
Version
2.3.3
Version published
Maintainers
2
Created
Source

fw-theme-builder

Fw Theme Builder is used to interactively create your theme

Installation

npm i @fundwave/fw-theme-builder

Example usage

const theme = {
  fonts : {
    "Title" : {
      name : "DM Sans",
      url: 'https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZOIHQ.woff2',
      style: "'DM Sans', sans-serif",
    },
    "Body" : {
      name : "DM Sans",
      url: 'https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZOIHQ.woff2',
      style: "'DM Sans', sans-serif",
    }
  },
  sizes : {
    "Tiny"  : "10px",
    "XS"    : "14px",
    "S"     : "16px",
    "M"     : "18px",
    "L"     : "20px",
    "XL"    : "22px",
    "Huge"  : "48px",
  },
  colors : {
    "Primary" : {
      "Hex" : "#ad38d1",
      "L1" : "#ba68d3",
      "L2" : "#dcb5e7",
      "L3" : "#e5d3eb",
      "Contrast" : "#f0f0f0",
    },
    "Secondary" : {
      "Hex" : "#4a48c7",
      "L1" : "#5f5dce",
      "L2" : "#706fd1",
      "L3" : "#9190df",
      "Contrast" : "#ebdbdb",
    },
    "Background" : {
      "Hex" : "#eeeeee",
    },
    "Error" : {
      "Hex" : "#e61e1e",
      "L1" : "#f1b4b4",
    },
    "Text" : {
      "Title" : "#1b1b1b",
      "Subtitle" : "#1b1b1b",
      "Body" : "#1b1b1b",
      "Body-l1" : "#363636",
    }
  }
}
<fw-theme-builder
  .theme=${theme}
  @font-changed=${updateFont}
  @size-changed=${updateSize}
  @color-changed=${updateColor}
></fw-theme-builder>

API

Properties/Attributes

NameTypeDescription
themeObjectObject contains properties for Font, Size and Color like above mentioned example
fontOptionsArrayList of font options where each object contains name, url and style

Events

@font-changed

Return the type and updated font for that type.

e.detail = {
    type: "Type of updated font like Family, Title, etc",
    value: {
        url
        name
        style
    }
}

@size-changed

Return the type and updated size value for that type.

e.detail = {
    type: "Type of updated size like XL, M, etc",
    value: "Value of given size type"
}

@color-changed

Return group and its type which got updated with hsl, rgb, and hex

e.detail = {
    group: "Group value like Primary, Secondary, etc.",
    type: "Type of updated color like hex, contrast, etc",
    value: "Value of updated color type",
    hsl: "HSL value of color selected",
    rgb: "RGB value of color selected"
}

FAQs

Package last updated on 07 Oct 2025

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