fix(docs) Add custom attributes and Snippets documentation
This commit is contained in:
parent
265833d419
commit
b53f62c4d1
8 changed files with 116 additions and 17 deletions
|
@ -2,7 +2,28 @@
|
|||
title: Snippets
|
||||
---
|
||||
|
||||
A Snippet is a reuseable bit of markup for your pattern. They are provided by
|
||||
plugins. Below is an overview of all the different snippets we maintain.
|
||||
A Snippet is a reusable bit of markup that draws graphic elements on patterns.
|
||||
Snippets are provided by [plugins](/reference/plugins) and are implemented as
|
||||
[<defs> elements](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs)
|
||||
in the rendered SVG document.
|
||||
|
||||
## Signature
|
||||
|
||||
To place a Snippet at a given point:
|
||||
```js
|
||||
const snippet = new Snippet(String 'snippet name', Point anchor)
|
||||
```
|
||||
|
||||
<Related>
|
||||
See the [Snippet API](/reference/api/snippet)
|
||||
for more information about how to use Snippets in code.
|
||||
|
||||
See [Using Attributes](/howtos/code/attributes)
|
||||
for information about custom Attributes that can be used with Snippets.
|
||||
</Related>
|
||||
|
||||
## List of snippets
|
||||
|
||||
Below are all the different snippets we maintain.
|
||||
|
||||
<ReadMore list />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue