# Hero, url form

- **[Sections](/blocks/)**
- **[Hero](/blocks/hero/)**
- **Hero, url form**

A centred hero: a small pill badge, a large two-line heading, a line under it, then a label and one wide rounded input for a web address with a submit button.

## Import

- **CLI**

  ```
  npx shadcn add https://ui.klarhimmel.com/r/hero-url-form.json
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/hero-url-form';
  ```

Also called

- hero/url-form

- **About**: A centred hero: a small pill badge, a large two-line heading, a line under it, then a label and one wide rounded input for a web address with a submit button. On a phone the heading wraps to three lines and the input fills the width.
- **Category**: The first screen: what it is, who it is for, what to do next. New project? Set it up once: /get-started/installation.

## Notes

- **When to use it**: A centred hero with a pill badge, a two-line heading and one wide input for a web address with a submit button. Choose it when the first step is to paste a site, and `hero-prompt-box` when it is free text.
- **Writing for it**: - Write the label above the input as what the address is for, since it names the field for assistive tech as well.
- The form submits a GET with the address as `url` to the action page. Leave the action out and it submits to the page it is on.
- Keep the heading to two short lines. On a phone it wraps to three, so a long second line pushes the input down.
- **Watch out for**: The submit is a native form post, so the receiving page must handle a missing or malformed address. The block does not validate that the text is a real site.

## Pairs well with

- **[Logos strip](/blocks/logo-cloud/row)**
- **[Steps, horizontal](/blocks/steps/horizontal)**
- **[Features, grid](/blocks/features/grid)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import HeroUrlForm from '@/components/klarhimmel/blocks/hero-url-form';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroUrlForm props={{
          "badge": "Name what is new or true now",
          "title": "Say what the visitor gets in two short lines",
          "description": "Say in one or two sentences why it matters to the visitor and what they do next.",
          "label": "Ask for the visitor's address",
          "submit": "Start"
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

- **action**: Text, up to 300 characters. Optional; empty is not rendered.
- **method**: One of 'post', 'get'. Optional; empty is not rendered.
- **hidden**: Optional; empty is not rendered.
- **captcha**: Optional; empty is not rendered.
- **captchaSitekey**: Text, up to 100 characters. Optional; empty is not rendered.
- **badge**: Text, up to 40 characters.
- **title**: Text, up to 80 characters.
- **description**: Text, up to 200 characters.
- **label**: Text, up to 40 characters.
- **submit**: Text, up to 24 characters.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/hero/terminal)

[Next](/blocks/logo-cloud/featured)
