-
Notifications
You must be signed in to change notification settings - Fork 836
Open
Labels
Description
Description
Currently the navigation rail can either be used or not. It is not possible to show / hide the navigation rail on demand.
It would be nice to be able to toggle the visibility of the navigation rail.
Considerations
From what i understand, the navigation rail is a plugin and not a basic puck feature.
Also the navigation rail holds mostly other plugins as their content.
It needs to be considered wether to implement this on the plugin side or on puck side.
Proposals
Proposal 1
I would like to see a solution that is part of the Puck API.
Similar to hiding the sidebars.
const usePuck = createUsePuck();
const dispatch = usePuck((s) => s.dispatch);
const togglePreview = () => {
dispatch({
type: "setUi",
ui: {
navigationRailVisible: false,
},
});
};
Reactions are currently unavailable