On my web page I have an onboarding-card component that is repeated a bunch of times. I'm trying to implement some Javascript to automatically scroll down to a card. If these were HTML elements with ids, I could use scrollIntoView(), but since these are components they don't have ids -- or do they? I tried making an attribute named id inside the component but that didn't seem to be recognized by scrollIntoView().
Relatedly, if I wanted to override the CSS of a particular component, is there a way I can do this with CSS? For example, if I put a style script on my page that includes the component, can I specify a particular component?
[what would I put here?] {
background-color: yellow;
}