Socket
Socket
Sign inDemoInstall

@html-polygon/vue

Package Overview
Dependencies
22
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @html-polygon/vue

Pure HTML polygons for Vue 3, no SVG.


Version published
Maintainers
1
Created

Readme

Source

HTML Polygon for Vue 3

HTML Polygon is a polygon element generator for the following web frameworks:

  • React
  • Vue 3 ← this package

Visit the playground and complete documentation at the HTML Polygon website.

Install

# NPM
npm install @html-polygon/vue

# Yarn
yarn add @html-polygon/vue

# PNPM
pnpm add @html-polygon/vue

Quick start

Import the component:

import { Polygon } from '@html-polygon/vue'

Use the component:

<Polygon
  sides="5"
  :style="{
    height: '300px',
    width: '300px',
  }"
>
  I have 5 sides.
</Polygon>

Complete documentation can be found at the HTML Polygon website.

Why?

There are lots of polygon building utilities out there. They all generate either embedded SVGs, or they use CSS clip paths to clip the shape of standard divs.

The thing they all have in common is their inability to reliably contain text that "flows" into the shape to fill the polygon.

This is where HTML Polygon differs. This component builds an HTML element that both looks like a polygon, and behaves like a polygon.

You can use HTML Polygen to emulate the effects of the proposed CSS Shapes property shape-inside.

Keywords

FAQs

Last updated on 31 Mar 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc