Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Add cross references to widget contributions #331

Merged
merged 6 commits into from
Apr 5, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions _docs/templates/_npe2_widgets_guide.md.jinja
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
(widgets-contribution-guide)=
## Widgets

Widget plugins allow developers to contribute novel graphical
elements (aka "widgets") to the user interface. These widgets can request
Widget plugin contributions allow developers to add novel graphical
elements (aka "widgets") to the user interface. For a full introduction to
creating `napari` widgets see [](creating-widgets).

Widgets can request
access to the viewer instance in which they are docked, enabling a broad
range of functionality: essentially, anything that can be done with the
napari `Viewer` and `Layer` APIs can be accomplished with widgets.
Expand Down Expand Up @@ -58,6 +61,11 @@ specification:
hook specification. In the new `npe2` pattern, one uses the `autogenerate`
field in the [WidgetContribution](contributions-widgets).

For more examples see [](creating-widgets) and
[GUI gallery examples](https://napari.org/stable/_tags/gui.html) (only a subset
involve widgets). Additionally,
[cookiecutter-napari-plugin](https://github.com/napari/cookiecutter-napari-plugin)
has more robust widget examples that you can adapt to your needs.

### Widget example

Expand Down
Loading