Styling
Most of the styling can be done by overriding these custom properties (with defaults):
--toggle-nav-background: rgb(225 225 225);
--toggle-nav-border-radius: 0;
--toggle-nav-button-focus-outline: 2px solid blue;
--toggle-nav-button-padding: 10px;
--toggle-nav-close-button-margin-inline-start: auto;
--toggle-nav-inline-size: min(100vw, 32.5rem);
--toggle-nav-inset-block: 0;
--toggle-nav-inset-inline-start: calc(100% + var(--toggle-nav-inline-size));
--toggle-nav-expanded-inset-inline-start: calc(100% - var(--toggle-nav-inline-size));
--toggle-nav-list-gap: 10px;
--toggle-nav-overlay-background: rgb(0 0 0 / 0.25);
--toggle-nav-padding: 20px;
--toggle-nav-text-size: 1rem;
--toggle-nav-transition: inset 350ms ease-in-out;
For example, you could do something like:
toggle-nav {
--toggle-nav-inset-inline-start: calc(0px - var(--toggle-nav-inline-size));
--toggle-nav-expanded-inset-inline-start: 0;
}
... in your stylesheet, to make the element appear from the left of your screen.
Some sections of the element can also be styled using the ::part pseudo-selector...
toggle-nav::part(header) {
background-color: green;
}
Available ::part(s) to style are (header), (main), (footer).
More styling can be achieved by directly editing the component source.