Anchor
@stellaria/nebula-webAnchorPropsPreview
Props
8| Prop | Type | Default |
|---|---|---|
children | ReactNode | — |
className Composes with the classes `Box` computes instead of replacing them. | string | — |
component The element it paints, and the seam where a router plugs in: pass your framework's link component (`component={NextLink}`) and its own props travel through untouched. It is why the core carries no router dependency. | (ElementType & C) | "a" |
external Opens in a new tab and adds `rel="noopener noreferrer"` in the same move — the two go together so an external target can never reach `window.opener`. Both are spread before the rest, so an explicit `target` or `rel` of your own still wins. | boolean | false |
inherit Takes family, size, weight and line height from the parent instead of the `Text` defaults. For text that must sit inside a heading or a button without breaking its type. | boolean | — |
lines Clamps the text to this many lines with an ellipsis. Beats `truncate`, and only applies above zero. Needs a width to work against: inside a flex child, that usually means `miw={0}`. | number | — |
truncate Cuts the text to a single line with an ellipsis. Ignored when `lines` is set, which does the same thing over several lines. The full text stays in the DOM, so it is still read aloud. | boolean | — |
underline When the underline shows. It is on always because the link has to be tellable from body text without relying on colour; `"hover"` and `"never"` move that job onto something else, and the surrounding design has to provide it. | AnchorUnderline | "always" |
Also accepts
On top of its own props, this component forwards these groups.