A frame for your content
Your markup stays yours: changing the border keeps this text and the input below.
Integration
Attach a frame, a divider or an image to any element. Each controller picks the right artwork for its size and can be updated or removed later. No framework required.
npm i @ranx729/medieval-ornamentsEvery pattern works as a divider in either direction. Patterns with approved corners also work as frames. Changes call update() on the same controllers.
Your markup stays yours: changing the border keeps this text and the input below.
Whole images keep their proportions. Choose one of the sizes published for the selected image; it is shown at that file’s pixel size.
For a fixed selection, import each design directly. Your bundle then contains only that design’s metadata, and the design option is not needed.
import { createDivider }
from '@ranx729/medieval-ornaments/designs/red-berry-vine';
import '@ranx729/medieval-ornaments/styles.css';
createDivider(document.querySelector('.divider'));
import { createOrnamentImage }
from '@ranx729/medieval-ornaments/designs/flying-pig';
createOrnamentImage(document.querySelector('img'), {
size: 128, loading: 'lazy', decoding: 'async'
});
Some decorations are parts of a composition. These gold rules place fixed-size end and centre images over a continuous CSS rule that grows with the available width.
Composition JavaScript · Composition CSS
Matching gold-capped terminals and a centerpiece form a flexible red-and-gold divider. Use the fleuron, rosette and horizontal flourish between sections, or the leafy sprigs beside headings and in margins.
Browse the complete set · Composition JavaScript · Composition CSS