Code Monkey home page Code Monkey logo

lilasia-icons's Introduction

Lilasia Icons

This package provides a simple Vue.js component to easily incorporate Material Symbols icons into your project. Material Symbols are a versatile set of icons suitable for various applications.

Installation

You can install the package via npm:

npm install lilasia-icons

or via yarn:

yarn add lilasia-icons

Usage

First, import the Icon component into your Vue application:

<script setup lang="ts">
import 'lilasia-icons/dist/style.css'
import Icon from 'lilasia-icons'
</script>

<template>
  <div>
    <Icon name="home" />
  </div>
</template>

Props

The Icon component accepts the following props:

  • name (string, required): The name of the Material Symbol icon.
  • filled (boolean, optional): Whether the icon should be filled. Default is false.
  • weight (number | string, optional): The weight of the icon. Default is 400.
  • grade (number | string, optional): The grade of the icon. Default is 0.
  • opticalSize (number | string, optional): The optical size of the icon. Default is 48.
  • size (number | string, optional): The size of the icon. Default is 24.

Example

<script setup lang="ts">
import 'lilasia-icons/dist/style.css'
import Icon from 'lilasia-icons'
</script>

<template>
  <div>
    <Icon name="add_circle" :size="30" filled />
    <Icon name="delete" :size="30" />
    <Icon name="search" :size="30" />
  </div>
</template>

Style Customization

If you want to customize the icon style, just override this:

.lilasia-icon {
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.