0

In an SPFx webpart which has No Javascript Framework is it possible to style buttons and other elements to the Office UI Fabric to make them look like OOTB? Thanks P

 this.domElement.innerHTML = `
      <div>
        <div class="${ styles.customWebPart }">
          <div class="${ styles.basicListContainer }">
          <div class="${ styles.basicListTitle }">${this.properties.wpTitle}</div>
          <Button>click me please</Button>
          <Label>click me please</Label>
          <p> ${await this.getListData(filterValue)}</p>
            </div>
          </div>
        </div>
      </div>`;
2
  • 1
    Yes, install npm module office-ui-fabric-react & then you can use office ui/fluent ui controls in your web part. Commented Oct 5, 2021 at 12:26
  • Hi Ganesh I have the office-ui-fabric-react in my package.json .... I try to render the button and label (code in OP) but it doesn't look right. Thanks P Commented Oct 5, 2021 at 13:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.