File tree Expand file tree Collapse file tree 1 file changed +65
-0
lines changed
fern/products/docs/pages/writing-content Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ # Images
2+
3+ Images in Fern documentation can be added using standard Markdown syntax or HTML tags.
4+
5+ ## Basic Image Syntax
6+
7+ ### Markdown
8+ ``` md
9+ 
10+ ```
11+
12+ ### HTML
13+ ``` html
14+ <img src =" ./path/to/image.png" alt =" Alt text" />
15+ ```
16+
17+ ## Image Options
18+
19+ ### Preventing Zoom
20+ To prevent an image from being zoomable, add the ` noZoom ` attribute:
21+
22+ ``` html
23+ <img src =" ./path/to/image.png" alt =" Alt text" noZoom />
24+ ```
25+
26+ ### Classes and Styling
27+ Add CSS classes using the ` className ` attribute:
28+
29+ ``` html
30+ <img
31+ src =" ./path/to/image.png"
32+ alt =" Alt text"
33+ className =" custom-class"
34+ />
35+ ```
36+
37+ ## Best Practices
38+
39+ - Always include descriptive alt text for accessibility
40+ - Use relative paths starting with ` ./ ` or ` ../ `
41+ - Optimize images for web before adding to docs
42+ - Consider if zoom functionality is needed for each image
43+ - Keep image file sizes reasonable for fast loading
44+
45+ ## Examples
46+
47+ A zoomable image (default behavior):
48+ ``` html
49+ <img src =" ./examples/chart.png" alt =" Data visualization chart" />
50+ ```
51+
52+ A non-zoomable image:
53+ ``` html
54+ <img src =" ./examples/icon.svg" alt =" Navigation icon" noZoom />
55+ ```
56+
57+ A styled image with multiple attributes:
58+ ``` html
59+ <img
60+ src =" ./examples/diagram.png"
61+ alt =" Architecture diagram"
62+ className =" border rounded-lg"
63+ noZoom
64+ />
65+ ```
You can’t perform that action at this time.
0 commit comments