preact-svg

Use SVG with Preact.

MIT 14 个版本
安装
npm install preact-svg
yarn add preact-svg
pnpm add preact-svg
bun add preact-svg
README

preact-svg

NPM travis-ci

An <SVG> wrapper component that makes inline <svg> work in Preact.

CodePen Demo

preact-svg


Usage Example

import SVG from 'preact-svg';
import { h, render } from 'preact';
/** @jsx h */

const Main = () => (
	<SVG width="100" height="50">
		<path d="M0,0T 50,50 100,50 50,100Z" stroke="#000" stroke-width="2" />
	</SVG>
);

render(<Main />, document.body);

License

MIT

版本列表
1.6.0 2016-06-06
1.5.1 2016-05-10
1.5.0 2016-05-09
1.4.3 2016-03-03
1.4.2 2016-02-29
1.4.1 2016-02-07
1.4.0 2016-02-06
1.3.0 2016-02-02
1.2.0 2015-11-30
1.1.0 2015-11-27
1.0.2 2015-11-26
1.0.1 2015-11-26
1.0.0 2015-11-26
0.1.0 2015-11-20