Skip to content

@0xdolan/deq-vue

Deq shapes as typed, tree-shakable Vue 3 components.

<script setup>
import { RojHalfSun, DeqIcon } from "@0xdolan/deq-vue";
</script>
<template>
<RojHalfSun :size="32" :stroke-width="1.5" absolute-stroke-width />
<DeqIcon name="kurdish-sun" color="#ED2024" />
</template>

Source: packages/vue. Install with npm install @0xdolan/deq-vue.

Per-shape exports

93 generated exports, one per shape, such as ArchDot, ArchDotColumn, ArrowDown. The icon list shows every shape.

Functions

createDeqIcon

function createDeqIcon(icon: DeqIcon, name: string): DeqIconComponent

Make a typed component from icon data (@0xdolan/deq-icons). The generated components use this; call it yourself for custom icon data.

Constants

DeqIcon

const DeqIcon: DefineComponent<ExtractPropTypes<{ size: { readonly type: PropType<string | number>; readonly default: undefined; }; color: { readonly type: StringConstructor; readonly default: undefined; }; strokeWidth: { readonly type: PropType<string | number>; readonly default: undefined; }; absoluteStrokeWidth: { readonly type: BooleanConstructor; readonly default: undefined; }; title: { readonly type: StringConstructor; readonly default: undefined; }; name: { type: StringConstructor; required: true; }; }>, () => VNode<RendererNode, RendererElement, { [key: string]: any; }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, ToResolvedProps<ExtractPropTypes<{ size: { readonly type: PropType<string | number>; readonly default: undefined; }; color: { readonly type: StringConstructor; readonly default: undefined; }; strokeWidth: { readonly type: PropType<string | number>; readonly default: undefined; }; absoluteStrokeWidth: { readonly type: BooleanConstructor; readonly default: undefined; }; title: { readonly type: StringConstructor; readonly default: undefined; }; name: { type: StringConstructor; required: true; }; }>, {}>, { size: string | number; color: string; strokeWidth: string | number; absoluteStrokeWidth: boolean; title: string; }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>

Any icon by catalog id: <DeqIcon name="roj-half-sun" />. It keeps every icon in the bundle; import the named components (RojHalfSun) to tree-shake.

@throws {DeqError} UNKNOWN_SHAPE for an id that is not in the catalog.

packageName

const packageName: '@0xdolan/deq-vue'

The npm package name.

Types

DeqIconComponent

type DeqIconComponent = DefineComponent<typeof iconProps>

A Deq icon component: the props of DeqIconProps, plus a default slot.

DeqIconProps

type DeqIconProps = IconOptions

Props of every Deq icon component; other attributes fall through to the <svg>.