Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Rough Notation

Laravel Rough Notation Laravel Package

amjadiqbal/laravel-rough-notation

A Laravel package that wraps Rough Notation, making it easy to add hand-drawn style annotations such as underlines, boxes, circles, highlights, brackets, and strike-throughs to text using Blade directives and PHP helpers with configurable animation.

View on GitHub
Deep Wiki
Context7

Laravel package — Rough Notation hand-drawn annotations: circle, underline, highlight

Frequently asked questions about Laravel Rough Notation
How do I install amjadiqbal/laravel-rough-notation in a Laravel app?
Install it with Composer using the package name, publish its assets if the service provider exposes a publish tag, and add the @roughNotationScripts directive once in your base Blade layout. Then annotate elements by adding the package's data attributes to the markup you want circled, underlined, or highlighted. Pin an explicit tagged version rather than tracking dev-main, since earlier releases shipped without version tags.
Which annotation styles does this Laravel package support?
It wraps Rough Notation, so the available types are the ones that library draws: circle, underline, highlight, box, bracket, and strike-through. The style is selected per element through the options payload, and each element can use a different type, color, or stroke width. Because every annotation is just an SVG overlay, the underlying text stays fully selectable and copyable.
How do I use the @roughNotationScripts Blade directive?
Place @roughNotationScripts once per page, typically near the end of your layout's body so the script loads after the annotated DOM exists. Very early builds of this package had a defect where the directive failed to compile and threw a parse error in any view that used it, so confirm you are on a recent tagged release before wiring it into a layout. If you have an existing local workaround in place, remove it before adopting the fixed directive to avoid double loading the script.
How do I configure color, duration, or stroke width for a single annotation?
Configuration is per element via a data-rough-options attribute that carries a JSON object, with keys mirroring the upstream Rough Notation options such as type, color, strokeWidth, animationDuration, padding, multiline, and iterations. An earlier release over-escaped this attribute so it read back as HTML entities instead of valid JSON; inspect the rendered DOM and make sure the value parses. Any pre-escaped JSON or raw-output workaround added for the buggy version should be removed, or it will double-encode on the fixed release.
Which PHP and Laravel versions does laravel-rough-notation support?
The package is a thin presentation-layer wrapper with no database, queue, or container bindings, so its real constraint is the service provider and Blade directive syntax. Check the composer.json constraint on the tagged release you intend to use and compare it against your application floor before committing. Because the surface area is tiny, an out-of-range incompatibility is usually a fork-and-patch afternoon rather than a blocker.
Does it load Rough Notation from a CDN or vendor the JavaScript?
The package owns script injection through its own directive rather than routing through Vite, so asset fingerprinting, cache busting, and subresource integrity become its responsibility instead of your build's. Confirm whether the published asset is a vendored copy of the Rough Notation JS or a CDN reference, because the answer affects offline builds, SRI, and supply-chain review. If your house convention requires everything to go through Vite, you can install rough-notation from npm directly and skip the directive entirely.
Do annotations survive Livewire updates, Alpine re-renders, or Inertia navigation?
Annotations are drawn client-side against the DOM elements present at render time, and the package does not hook into Livewire morphs, Alpine re-renders, Turbo, or Inertia hydration. Any DOM replacement can leave the original SVG overlays orphaned or misaligned until you re-initialise. Test your specific dynamic islands and re-run initialisation from the relevant lifecycle hook if you rely on them.
Is laravel-rough-notation accessible and does it respect prefers-reduced-motion?
Generated SVGs are decorative, so they should be marked aria-hidden so screen readers do not announce duplicate content alongside the real text. The animation is a progressive enhancement, so gate it behind a prefers-reduced-motion media query check and render the annotation instantly for users who opt out. Verify both behaviours in the rendered output rather than assuming, since accessibility handling is a small detail that is easy to overlook in a wrapper package.
Will @roughNotationScripts break a strict Content Security Policy?
The directive injects a script tag into your Blade output, which will be blocked if your CSP forbids inline scripts. Check whether the package exposes a nonce or integrity option; if it does not, either add the nonce yourself around the emitted tag or move the script into your Vite bundle and keep only the data attributes in Blade. This is the one place where the package diverges from a standard Vite asset pipeline, so document the decision for your team.
Is laravel-rough-notation production ready and how is it maintained?
It is a small, single-maintainer presentation package whose blast radius is an annotation failing to draw, so the risk is governance rather than architecture. It shipped on Packagist for a period without version tags, meaning consumers tracked dev-main with no semver contract, and the first fixes came from running a Pest suite that already existed but had never been executed. Pin a tagged release, add a Blade compile smoke test in your own CI, and keep a fork-readiness note in case maintenance stalls.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource