> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# CSS-In-JS API

Use Style Component to write CSS.

## Usage

```ts
import styled from '@modern-js/plugin-styled-components/styled';
```

## Function Signature

see [styled-component API](https://styled-components.com/docs/api).

## Example

```tsx
import styled from '@modern-js/plugin-styled-components/styled';

const Button = styled.button`
  background: palevioletred;
  border-radius: 3px;
  border: none;
  color: white;
`;

const TomatoButton = styled(Button)`
  background: tomato;
`;

function ButtonExample() {
  return (
    <>
      <Button>I'm purple.</Button>
      <br />
      <TomatoButton>I'm red.</TomatoButton>
    </>
  );
}
```
