Skip to content
BigBang

Popular

    ↑↓Navigate↵OpenEscClose
    TR

    Components

    InfoPopover

    A small info button next to a label or value that opens a short explanation on press.

    Storybook
    Storybook
    Source
    Source

    The example below loads live from Storybook; open it in Storybook to use the controls.

    Live example, StorybookOpen in Storybook

    The button is named by label, which says what it explains. The panel opens on press; it works on touch screens and with the keyboard too.

    Field label
    import { InfoPopover } from '@bigbang/ui';
    export default function Default() {
    return (
    <span className="inline-flex items-center gap-xs type-label-md">
    Field label
    <InfoPopover label="About the field label" title="Field label">
    A short explanation of why this field is asked for and how to fill it in goes here.
    </InfoPopover>
    </span>
    );
    }

    icon="circle-help" explains how to fill in a field. Without a title the panel is named by the button label.

    Value
    import { InfoPopover } from '@bigbang/ui';
    export default function Help() {
    return (
    <span className="inline-flex items-center gap-xs type-body-md">
    Value
    <InfoPopover label="About the field label" icon="circle-help" side="bottom">
    A short explanation of why this field is asked for and how to fill it in goes here.
    </InfoPopover>
    </span>
    );
    }

    The panel uses the same tokens as Popover.

    Field label
    Field label
    import { InfoPopover } from '@bigbang/ui';
    export default function Default() {
    return (
    <span className="inline-flex items-center gap-xs type-label-md">
    Field label
    <InfoPopover label="About the field label" title="Field label">
    A short explanation of why this field is asked for and how to fill it in goes here.
    </InfoPopover>
    </span>
    );
    }