diff --git a/REQUIRE b/REQUIRE index 913b0ec..4d0318d 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,11 +1,11 @@ julia 0.7 JSON 0.7 -InteractBase 0.8.1 +InteractBase 0.8.3 InteractBulma 0.4.0 WebIO 0.3.1 CSSUtil Knockout DataStructures 0.2.10 -Widgets 0.4.1 +Widgets 0.5.0 Reexport 0.1.0 Observables 0.2.2 diff --git a/docs/src/custom_widgets.md b/docs/src/custom_widgets.md index 3685023..ade7169 100644 --- a/docs/src/custom_widgets.md +++ b/docs/src/custom_widgets.md @@ -41,8 +41,21 @@ Interact.@layout ## Defining custom widgets without depending on Interact -```@docs -Widgets.@nodeps +This is only relevant for package authors: it is not necessary to depend on Interact to define custom widgets. One can instead use the low-dependency package [Widgets](https://github.com/piever/Widgets.jl) that defines (but does not export) all the widgets. For example: + +```julia +# in the package MyPackage defining the recipe: +using Widgets +function myrecipe(i) + label = "My recipe" + wdg = Widgets.dropdown(i) + Widget(["label" => label, "dropdown" => wdg]) +end + +# The user would then do: +using MyPackage, Interact + +myrecipe(["a", "b", "c"]) ``` ## A simpler approach: the manipulate macro