Playground

This component's contract doesn't list typed props, so the playground shows its documented example.

Documented example search-input-clear : activate clear control, empty value emitted once.

The render follows the page's theme switch: light, dark or high contrast. Both frameworks render the same example.

The real SearchInput, live
React
Vue

Events it emits: valueChange, update, search, clear. Use either render above, and each event shows here with the framework that sent it.

    Code

    The documented example. HTML is the markup the React component renders for it, which @oods/component-styles styles.

    import { SearchInput } from '@oods/components-react';
    import '@oods/component-styles/css';
    
    export function Example() {
      return (
        <SearchInput
          label="Search subscriptions"
          value="past due"
          placeholder="Search subscriptions"
          clearable={true}
        />
      );
    }

    Props, slots and events

    Contract version 1.1.0. Types are from the React declarations in @oods/components-react.

    Props
    PropTypeRequiredDocumented example
    id string | undefined no
    label string | undefined no Search subscriptions
    value string | undefined no past due
    defaultValue string | undefined no
    placeholder string | undefined no Search subscriptions
    clearable boolean | undefined no true
    debounceMs number | undefined no
    debounce number | undefined no
    minQueryLength number | undefined no
    disabled boolean | undefined no

    Slots

    none

    Events

    valueChange, update, search, clear

    States

    empty, valued, disabled

    Accessibility

    Role
    searchbox
    How it gets its name
    label on input

    Keyboard

    Keyboard
    KeyWhat it does
    TabMove focus to the named native control
    EscapeClear the current search

    Obligations in the contract

    • Native search input semantics
    • Clear control has an accessible label

    Debounce and minimum-query settings preserve value updates across both targets.

    Tokens

    The token roles this component reads.

    • input.background
    • input.border
    • input.text
    • input.placeholder
    • input.focus

    Readiness

    The evidence recorded for this component, with its label.

    proven-in-generated-apps: catalog_list gives this label when generated React and Vue apps in the runtime sweep that ships with this version both use the component. That sweep was measured on the published 0.4.1, not on this version.

    Readiness evidence
    EvidenceReactVue
    stateimplemented-evidence-completeimplemented-evidence-complete
    versioned contractpassedpassed
    target implementationpassedpassed
    package exportpassedpassed
    public declarationpassedpassed
    dependency closurepassedpassed
    framework scenariopassedpassed
    accessibilityverifiedverified
    interactionverifiedverified
    visual themesverifiedverified

    Use your own

    You can replace this component with your own React or Vue component. Map it, and generated code imports yours at the exact version you name. A contract report, run in a real browser, lists what your component met, what it didn't, and what wasn't checked.

    The component_map call, with the parts in angle brackets yours to fill:

    {
      "action": "create",
      "apply": true,
      "externalSystem": "<your design system>",
      "externalComponent": "<YourSearchInput>",
      "oodsTraits": [
        "Searchable"
      ],
      "substitution": {
        "component": "SearchInput",
        "react": {
          "package": "<your-package>/react",
          "version": "<exact version>",
          "export": "<YourSearchInput>"
        },
        "vue": {
          "package": "<your-package>/vue",
          "version": "<exact version>",
          "export": "<YourSearchInput>"
        }
      }
    }

    How this page was made

    Generated at build from the published data, each source with the hash of what was read. The page's manifest.

    • Contract: @oods/component-contracts@0.10.1 componentContracts.SearchInput sha256:a3db61f63417…
    • Documented example: @oods/component-contracts@0.10.1 sharedScenarios search-input-clear sha256:a1ec78378f58…
    • Catalog entry (catalog_list): generated/0.10.1/system/catalog.json SearchInput sha256:e9fd22f57bee…
    • React readiness: @oods/components-react@0.10.1 readiness SearchInput sha256:8023cc0807ee…
    • Vue readiness: @oods/components-vue@0.10.1 readiness SearchInput sha256:45d7a78c8a85…
    • Prop types: generated/0.10.1/components/prop-types.json SearchInput sha256:5a4157ec7013…