Get a style's selector
style.getSelector()
Retrieve the CSS selector this style produces, as shown in the Designer’s Styles panel. The returned string is the canonical query selector for the style in the rendered stylesheet.
Unlike the style’s name (for example, Button or Body), the selector is lowercased and CSS-sanitized through the same pipeline the renderer uses.
Pseudo-state and component-variant selectors aren’t included. Those live on a style’s variants, not as separate Style objects.
Syntax
Returns
Promise<string>
A Promise that resolves to the style’s canonical CSS selector. The exact shape depends on the style’s type: