Hero
The top of a landing page: a headline, a sentence, two buttons and a screenshot or image.
Preview
Now in public beta
Ship your app with less code
MyApp gives your team one place to plan, track and ship work. Start free, with no card needed.
Add it to your project
-
Sign in once on this machine
izzy loginThe account is free. Create a free account
-
Add the block
izzy add block heroWrites Components/Blocks/Hero.razor and places it on Home, after <PageTitle>.
Settings
Each setting is a flag on izzy add. The flag syntax isn't final; for now it looks like this:
izzy add block hero --layout Centered --media Screenshot| Name | Type or choices | Default | Description |
|---|---|---|---|
Layout | Centered | Split | Centered | Centered stacks everything in the middle; Split puts the image or screenshot beside the text. |
Eyebrow | text | Empty | A short pill above the headline, such as "Now in public beta". Empty leaves it out. |
EyebrowHref | text | Empty | Makes the eyebrow a link, such as to the announcement. Empty leaves it plain. |
Headline | text | Ship your app with less code | The headline: what you offer, in a few words. |
Subhead | text | {{ProjectName}} gives your team one place to plan, track and ship work. Start free, with no card needed. | The sentence under the headline. |
PrimaryText | text | Get started | The main button. |
PrimaryHref | text | get-started | Where the main button goes. |
SecondaryText | text | See how it works | The second button. Empty leaves it out. |
SecondaryHref | text | about | Where the second button goes. |
Media | Screenshot | Image | None | Screenshot | Screenshot frames the image in a browser window; Image shows it as it is. |
Address | text | myapp.com | The address in the screenshot's browser bar. Empty shows only the dots. |
ImageSrc | text | Empty | The image, from wwwroot. Empty uses a placeholder to replace: a dashboard for Screenshot, a landscape for Image. |
ImageAlt | text | A screenshot of the app | What the image shows, for screen readers. Empty marks it decorative. |
HeadingLevel | 1 | 2 | 1 | 1 makes the headline the page's main heading; use 2 when the page has its own. |
Name | text | Hero | The component's name. |
Into | text | Components/Pages/Home.razor | The page it's placed on: after its <PageTitle>, or under the page's own heading with HeadingLevel 2. |
Mode support
| Feature | Static | Interactive |
|---|---|---|
| Everything | Yes | Yes |
Static: static server-side rendering, with no circuit and no WebAssembly. Interactive: Server, WebAssembly or Auto.
Accessibility
- The section is named by its headline, which is the page's h1 (HeadingLevel 1) or an h2 under the page's own heading (HeadingLevel 2).
- The buttons are links, the main one first in reading order. On phones they stack at full width.
- The screenshot's browser bar is hidden from screen readers, so they read only the image's alt text. Empty alt text marks the image decorative.
- A linked eyebrow is a plain link named by its text.
Components used
- Section: Renders a full-width band of a page, such as a hero.
- Container: Centers content at a readable width.
- Grid: Lays out its children in columns set by breakpoint, by minimum width or by template.
- Stack: Lays out its children in a row or a column, changing with the screen width.
- Box: Renders a block that accepts every style prop.
- Tag: Shows a keyword or filter that can link or be removed.
- Heading: Renders headings 1 to 6, with fluid sizes and section links.
- TextBlock: Sets paragraphs, captions and labels in the library's text styles.
- Button: Submits or resets a form, follows a link or runs C#.
- BrowserFrame: Shows a screenshot inside a browser window.
- Image: Loads an image lazily and keeps its space.